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):
sendfile - send files over sockets or copy files to files
cc [ flag... ] file... -lsendfile [ library... ]
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:
Author: Björn Jacke <firstname.lastname@example.org>
Date: Sun Feb 10 22:38:49 2019 +0100
waf: add library dependency for sendfile on Solaris
Signed-off-by: Bjoern Jacke <email@example.com>
Reviewed-by: Andreas Schneider <firstname.lastname@example.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.