Busybox portability issues and musl compatibility

Denys Vlasenko vda.linux at googlemail.com
Mon May 2 01:58:57 UTC 2011

On Thursday 21 April 2011 04:34, Rich Felker wrote:
> On Sun, Apr 17, 2011 at 11:19:10PM +0200, Denys Vlasenko wrote:
> > > Finally, one thing that's not in the patch, but should be: Busybox's
> > > "make config" and "make menuconfig" require a some POSIX interfaces to
> > > be provided by the standard C headers, so on musl, HOSTCFLAGS
> > > containing -D_POSIX_C_SOURCE=... or -D_XOPEN_SOURCE=... or
> > > -D_GNU_SOURCE is needed to avoid compile-time errors that prevent
> > > configuration. Adding -D_POSIX_C_SOURCE=200112L (or whatever version
> > > you like) to the default host cflags would be more correct and would
> > > avoid this issue.
> > 
> > Let's add those defines to the .c files which need them.
> > Can you let me know which ones need them?
> I thought this was finished, but zconf.tab.c is still including .c
> files which use strdup without declaration. I can't put the feature
> test macro in those files alone, because string.h has already been
> included earlier while processing zconf.tab.c. This file is generated,
> so I'm not sure how to go about patching it right...

I think the place to insert them is zconf.y

More information about the busybox mailing list