summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/shutdown.c
diff options
context:
space:
mode:
authorAdhemerval Zanella Netto <adhemerval.zanella@linaro.org>2022-10-19 19:14:27 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-12-07 14:17:28 -0300
commit127945c561535be3975d418fa8f85334a76c298c (patch)
treec474761c747b9f402b8f36710e9f19aabb444930 /sysdeps/unix/sysv/linux/shutdown.c
parent377a14a22a202a0a161778b31a86d3cb6958dc43 (diff)
downloadglibc-127945c561535be3975d418fa8f85334a76c298c.tar.gz
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>
Diffstat (limited to 'sysdeps/unix/sysv/linux/shutdown.c')
-rw-r--r--sysdeps/unix/sysv/linux/shutdown.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/shutdown.c b/sysdeps/unix/sysv/linux/shutdown.c
index 26772c9b28..4cee357b9b 100644
--- a/sysdeps/unix/sysv/linux/shutdown.c
+++ b/sysdeps/unix/sysv/linux/shutdown.c
@@ -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