Subject: Re: mail/metamail/patches/patch-as breaks this package on Solaris
To: None <tech-pkg@netbsd.org>
From: None <joerg@britannica.bec.de>
List: tech-pkg
Date: 02/02/2006 02:47:45
--NzB8fVQJ5HfG6fxh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Wed, Feb 01, 2006 at 10:37:28PM +0000, segv@netctl.net wrote:
> In file included from putenv.c:22:
> /usr/include/stdlib.h:185: error: conflicting types for `srand48'
> /usr/include/stdlib.h:137: error: previous declaration of `srand48'
> putenv.c: In function `putenv':
> putenv.c:44: error: argument `string' doesn't match prototype
> /usr/include/stdlib.h:138: error: prototype declaration
> *** Error code 1

/me hates stupid third party code messing with system internals

Can you try the attached replacement for patch-as?

Joerg

--NzB8fVQJ5HfG6fxh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch-as

$NetBSD$

--- putenv.c.orig	1993-10-12 16:17:43.000000000 +0000
+++ putenv.c
@@ -16,20 +16,13 @@ License along with the GNU C Library; se
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <config.h>
 #include <sys/types.h>
 #include <errno.h>
-#ifdef STDC_HEADERS
 #include <stdlib.h>
-#else
-extern int errno;
-#endif
 
-#if defined(STDC_HEADERS) || defined(USG) || defined(SYSV)
 #include <string.h>
-#else /* not (STDC_HEADERS or USG) */
-#include <strings.h>
-#endif /* STDC_HEADERS or USG */
+
+#include "config.h"
 
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>

--NzB8fVQJ5HfG6fxh--