Busybox portability issues and musl compatibility

Rich Felker dalias at aerifal.cx
Sun Apr 17 22:06:56 UTC 2011


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?

Please see the attached patch. I added the standard <strings.h> rather
than using _GNU_SOURCE to get strcasecmp from <string.h>.

Rich


More information about the busybox mailing list