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

#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
> > Bacula-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/bacula-users
> >
> 
> 
> 
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to