Subject: Re: pkg/24861: mail/metamail doesn't build on linux
To: Jeremy C. Reed <>
From: Antonio Marques <>
List: netbsd-bugs
Date: 03/20/2004 18:45:26
On Sat, 20 Mar 2004 10:24:11 -0800 (PST)
"Jeremy C. Reed" <> wrote:
> Maybe SIGEMT is needed by others?
> > +#if !(defined(__linux__))
> >  #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 */
> > +#endif

Please ignore this patch. 

If this gets defined in config.h:
#define bzero(a, b) memset(a, 0, b)

I get this error:
gcc -c  -I../. -O2 -DPKG_SYSCONFDIR='"/usr/pkg/etc"' -DSYSV -I/usr/pkg/include -I.   putenv.c
In file included from putenv.c:29:
/usr/include/string.h:260: error: parse error before numeric constant
*** Error code 1

If this gets defined in config.h:
#define killpg(a, b) kill(-(a), (b))

I get this error:
gcc -c  -I../. -O2 -DPKG_SYSCONFDIR='"/usr/pkg/etc"' -DLINUX -I/usr/pkg/include -I.   metamail.c
In file included from metamail.c:46:
/usr/include/signal.h:121: error: parse error before '-' token
/usr/include/signal.h:121: error: parse error before "int"
*** Error code 1

A simple patch to avoid defining bzero and killpg is all that is required to
solve the rest of the compile problems.

> Maybe STDC_HEADERS or USG or SYSV should be set.
> Looking at config.h again I see that setting LINUX will do:
> #ifdef LINUX
> #define SYSV /* Linux is SysV */
> Can you try building metamail without your patches and in the
> pkgsrc/metamail/Makefile have something like
> ?

Ok, this solves the SIGEMT issue.
Sorry for complicating things.

Antonio Marques