[PATCH] Assume that accept4 is available
Florian Weimer
fweimer@redhat.com
Tue Apr 18 19:37:00 GMT 2017
On 04/17/2017 05:01 PM, Adhemerval Zanella wrote:
>> + {
>> + socklen_t sa_len = sizeof (server_address);
>> + xgetsockname (server_socket, (struct sockaddr *) &server_address,
>> + &sa_len);
>> + TEST_VERIFY (sa_len == sizeof (server_address));
>> + }
> Why the brackets? I usually seems this unnecessary.
I prefer to restrict the scope of local variables if possible.
> Now that we are assuming accept4 support regardless, I think
> we can simplify it even more and just have either
> __ASSUME_ACCEPT4_SYSCALL or __ASSUME_SOCKETCALL
> (which would imply __ASSUME_ACCEPT4_SYSCALL_WITH_SOCKETCALL).
We currently need all those because some override headers include
sysdeps/unix/sysv/linux/kernel-features.h before their own definitions,
others after. Rectifying that is a bit involved, and I don't want to do
it with this change.
I believe I have addressed your other suggestions with the attached patch.
Thanks,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: accept4.patch
Type: text/x-patch
Size: 19660 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170418/20a75e34/attachment.bin>
More information about the Libc-alpha
mailing list