On 3/4/2019 10:00 AM, Martin Simmons wrote:
I think the problem is that accept4 might be defined in libc, but not
implemented in the kernel. Hence it will be detected by configure but will
fail at run time.
The code could be improved by calling accept if accept4 fails at run time,
i.e. something like
Yes, it is defined in sys/socket.h header but is not actually
implemented by Zyxel's firmware. However, Bacula does not need to be
fixed, because Bacula's code uses accept4() in an absolutely correct
manner. This is either a Zyxel firmware bug or whoever compiled (or
corss-compiled?) Bacula for the platform used the wrong headers. So, I
disagree with a Bacula workaround. The fix should be either compiling
Bacula with the correct headers or else file a bug report with Zyxel.
#ifdef HAVE_ACCEPT4
fd = accept4(sockfd, addr, addrlen, SOCK_CLOEXEC);
if (fd >= 0 || errno != ENOSYS) {
return fd;
}
/* fallback to using accept upon ENOSYS */
#endif /* HAVE_ACCEPT4 */
fd = accept(sockfd, addr, addrlen);
__Martin
On Fri, 1 Mar 2019 17:14:02 +0100, Kern Sibbald said:
Were you careful to run a ./configure ... on the machine you then did
the make on? If Bacula picked up an old Linux created
<bacula>/src/config.h file that could explain the accept4 error.
In any case, I would make sure that your <bacula>/src/config.h file does
not contain a line that reads:
#define HAVE_ACCEPT4 1
If it does, then comment that line out (// at the beginning of the line
or simply deleting the line).
Then the build should work.
On 3/1/19 3:14 PM, Andrea Venturoli wrote:
On 3/1/19 12:34 PM, Kern Sibbald wrote:
At this point, my best assessment is that there is a bug in the Zyxel
libraries.
Just to clarify who's NOT to blame: to compile on a Zyxel NAS I had to
install several third party packages (FFP to begin with); so the
problem might lie in those third party, additional, unofficial packages.
bye & Thanks
av.
_______________________________________________
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
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users