Created attachment 16276 [details] Add -lsendfile for sendfile() On Solaris 10/11, use of sendfile() in source3/lib/sendfile.c requires -lsendfile. From sendfile(3): NAME sendfile - send files over sockets or copy files to files SYNOPSIS cc [ flag... ] file... -lsendfile [ library... ] #include <sys/sendfile.h> ssize_t sendfile(int out_fd, int in_fd, off_t *off, size_t len); Building source3/lib/sendfile.c for samba3util is done in source3/wscript_build. It seems this would be the ideal place to add -lsendfile. How is this done only for samba3util? I modified lib/replace/wscript to add -lsendfile but that is done for every shared library, something that seems less than ideal.
this is fixed already: commit b8bf7ef87e29daa18b079d221ffa3252d1719f2a Author: Björn Jacke <bj@sernet.de> Date: Sun Feb 10 22:38:49 2019 +0100 waf: add library dependency for sendfile on Solaris Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> so I think, this is not a problem any more. You should use a more modern Samba version or backport that fix to your old version if you want to stick with that.