bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: accept4 and SOCK_NONBLOCK


From: Richard W.M. Jones
Subject: Re: accept4 and SOCK_NONBLOCK
Date: Tue, 20 Aug 2019 17:03:25 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Aug 20, 2019 at 05:37:58PM +0200, Florian Weimer wrote:
> * Richard W. M. Jones:
> 
> > As for why accept4 is being replaced at all, the only reference to it
> > in config.log is:
> >
> >   configure:25630: checking whether accept4 is declared
> >   configure:25630: gcc -c -O2 -g -pipe -Wall -Werror=format-security 
> > -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions 
> > -fstack-protector-strong -grecord-gcc-switches 
> > -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 
> > -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic 
> > -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  
> > conftest.c >&5
> >   configure:25630: $? = 0
> >   configure:25630: result: yes
> 
> What does the test program look like?  Does it include <config.h>?
> accept4 requires _GNU_SOURCE.

I'm not sure how to find out.  However m4/accept.m4 (supplied
by gnulib itself) does contain:

  dnl Persuade glibc <sys/socket.h> to declare accept4().
  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])

so I guess the test *ought* to be using _GNU_SOURCE.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]