On 3/1/2019 6:34 AM, Kern Sibbald wrote:
Hello,
I have just examined the code, and in my view, the code is programmed
perfectly correctly.
I am not entirely sure what "Arguably it's an error between the
programmer's chair and keyboard" means, since it is non-standard
English. However, though the extension (accept4) is not on every
platform, the implementation of it as far as I can see is correct.
At this point, my best assessment is that there is a bug in the Zyxel
libraries.
It is certainly a bug in the Zyxel libraries. The accept4() is throwing
a ENOSYS, meaning that the function is simply not implemented. It seems
the header file being used (sys/socket.h) does not match the installed
library.
Nevertheless, accept4() is a convenience extension and it doesn't seem
worth potentially breaking some platforms to save one or two fcntl() calls.
Kind regards,
Josh Fisher
Best regards,
Kern
On 2/28/19 8:04 PM, Dmitri Maziuk via Bacula-users wrote:
On 2/28/2019 8:06 AM, Andrea Venturoli wrote:
On 2/28/19 2:23 PM, Martin Simmons wrote:
That suggests the function accept4 was defined at compile time by
fails with
errno=38 (ENOSYS) at run time.
I don't know what to answer.
I'm not competent enough to understand the difference between the
two; I cannot also tell why it is defined and why it does not work.
It looks like accept(4) is a gnu-ism that takes a couple of
convenience flags and falls back on accept() if the flags are 0.
Arguably it's an error between the programmer's chair and keyboard: by
using a non-standard extension that at best saves you a couple of
extra lines of code, they lost portability to non-glibc systems
including presumable musl-based linux distros.
But hey, we don't need portable C: ./configure libtool will figure it
all out for us.
Dima
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users