[PATCH] OpenBSD portability patch (when cross-compiling)
Denys Vlasenko
vda.linux at googlemail.com
Fri Aug 6 07:18:49 UTC 2010
On Wednesday 04 August 2010 11:24, Waldemar Brodkorb wrote:
> When cross-compiling busybox for Linux from OpenBSD, I get following errors:
>
> $ CROSS_COMPILE=i586-openadk-linux- HOSTCC=gcc gmake V=1
> rm -f .kernelrelease
> echo 1.18.0.git > .kernelrelease
> /home/wbx/busybox/scripts/gen_build_files.sh /home/wbx/busybox /home/wbx/busybox
> GEN include/usage.h
>
> gmake -f scripts/Makefile.build obj=scripts/basic
> mkdir -p .tmp_versions
> rm -f .tmp_versions/*
> gmake -f scripts/Makefile.build obj=applets
> gcc -Wp,-MD,applets/.usage.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -Iinclude -Iinclude -o applets/usage applets/usage.c
> applets/usage_compressed include/usage_compressed.h applets
> gcc -Wp,-MD,applets/.applet_tables.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o applets/applet_tables applets/applet_tables.c
> In file included from include/libbb.h:13,
> from include/busybox.h:10,
> from applets/applet_tables.c:16:
> include/platform.h:165:23: byteswap.h: No such file or directory
> include/platform.h:166:21: endian.h: No such file or directory
> include/platform.h:179:3: #error "Can't determine endianness"
> In file included from include/busybox.h:10,
> from applets/applet_tables.c:16:
> include/libbb.h:44:20: mntent.h: No such file or directory
> include/libbb.h:47:24: sys/statfs.h: No such file or directory
> In file included from include/busybox.h:10,
> from applets/applet_tables.c:16:
> include/libbb.h:489: error: field `sin' has incomplete type
> include/libbb.h:491: error: field `sin6' has incomplete type
> include/libbb.h:500: error: field `sin' has incomplete type
> include/libbb.h:502: error: field `sin6' has incomplete type
> In file included from include/busybox.h:10,
> from applets/applet_tables.c:16:
> include/libbb.h:1087: warning: `struct mntent' declared inside parameter list
> gmake[1]: *** [applets/applet_tables] Error 1
> gmake: *** [applets_dir] Error 2
> $
>
> The following patch solves these compile problems on the host.
>
> --- a/include/platform.h
> +++ b/include/platform.h
> +/* ---- Networking ------------------------------------------ */
> +
> +#if defined __OpenBSD__
> +#include <netinet/in.h>
> +#include <arpa/inet.h>
> +#endif
> +
> +
This part should be in libbb.h
Applied, thanks.
--
vda
More information about the busybox
mailing list