I had to add #include <sys/time.h> /* for FD_* macros */ and #include <sys/ioctl.h> /* for ioctl(), FIONREAD, etc */ to get it to compile on HP NonStop
Thanks, Jojo, this is fixed in master with 520c9b0b0ae33e6e8fb78034cfff685f5491aab3 now. Karo, please pick this to the release branches also.
Metze, can you review this one, please? If not, please feel free to re-assign. Thanks!
There's another bug(let) in poll.c, which I detected recently in git and gnulib. The code in Samba suffers from the same problem: diff -EBbu ./lib/replace/poll.c.orig ./lib/replace/poll.c --- ./lib/replace/poll.c.orig 2012-07-30 12:13:16 -0500 +++ ./lib/replace/poll.c 2012-09-17 05:15:39 -0500 @@ -40,7 +40,7 @@ int rc; nfds_t i; - if (fds == NULL) { + if (fds == NULL && nfds != 0) { errno = EFAULT; return -1; } This way it got fixed in gnulib (any I hope in git too). It results in poll() to be able to work as a millisecond sleep. I didn't check whether samba uses it that way anywhere though.
Created attachment 7898 [details] Patch Looks entirely correct. Metze, if you agree, please push to master and ack here. Thanks, Volker
Yep, completely correct - pushed to autobuild. Jeremy.
(In reply to comment #1) > Thanks, Jojo, this is fixed in master with > 520c9b0b0ae33e6e8fb78034cfff685f5491aab3 now. Karo, please pick this to the > release branches also. There's a bug in that commit, HAVE_SYS_IOCTL (wrong) vs. HAVE SYS_IOCTL_H (working)
thanks Joachim for spotting that! A fix for that is in autobuild and soon in master
This patch (https://bugzilla.samba.org/attachment.cgi?id=7898) has gone into master and applies cleanly to 4.0.0rc3 and 3.6.next. Re-assigning to Karolin for inclusion in 3.6.next and 4.0.0rc3. Jeremy.
Created attachment 8015 [details] all patches in one file to make things more clear ...
(In reply to comment #9) > Created attachment 8015 [details] > all patches in one file to make things more clear ... Pushed to v3-6-test and autobuild-v4-0-test. Closing out bug report. Thanks!