1.23.0 FreeBSD build fails: 1 showstopper mempcpy(), 1 sendfile() incompat.

Matthias Andree mandree at FreeBSD.org
Tue Jan 6 20:55:27 UTC 2015


Happy new year!

I just tried to upgrade the busybox-unstable port on FreeBSD to 1.23.0,
but one issue of the two given below is a showstopper.


The first one pertains to an incompatibility around sendfile. Easily
sidestepped by deconfiguring it.

> libbb/copyfd.c:12:27: error: sys/sendfile.h: No such file or directory
> libbb/copyfd.c: In function 'bb_full_fd_action':
> libbb/copyfd.c:65: warning: passing argument 3 of 'sendfile' makes integer from pointer without a cast
> libbb/copyfd.c:65: error: too few arguments to function 'sendfile'

FreeBSD's sendfile() is documented here:
<https://www.freebsd.org/cgi/man.cgi?query=sendfile&apropos=0&sektion=2&manpath=FreeBSD+10.1-RELEASE&arch=default&format=html>


The showstopper pertains to using a GNUism, namely mempcpy():

> libbb/lib.a(replace.o): In function `xmalloc_substitute_string':
> replace.c:(.text.xmalloc_substitute_string+0x6c): undefined reference to `mempcpy'
> replace.c:(.text.xmalloc_substitute_string+0x7c): undefined reference to `mempcpy'

This needs to be replaced by memcpy + pointer arithmetics, or a
replacement mempcpy() function on systems that don't bring their own.

Best regards,
Matthias

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20150106/b93dc83c/attachment.asc>


More information about the busybox mailing list