mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Linux: Assume and consolidate shutdown wire-up syscall
And disable if kernel does not support it. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
committed by
Adhemerval Zanella
parent
377a14a22a
commit
127945c561
@ -15,19 +15,14 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include <socketcall.h>
|
||||
#include <kernel-features.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
int
|
||||
__shutdown (int fd, int how)
|
||||
{
|
||||
#ifdef __ASSUME_SHUTDOWN_SYSCALL
|
||||
return INLINE_SYSCALL (shutdown, 2, fd, how);
|
||||
return INLINE_SYSCALL_CALL (shutdown, fd, how);
|
||||
#else
|
||||
return SOCKETCALL (shutdown, fd, how);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user