]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/unix/sysv/linux/getsockname.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / getsockname.c
index 6c84acec25b69df914c8bdd5423c0c6210dddd73..0b55def606a9dd40fc16090eaa90190a41f6870b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2015 Free Software Foundation, Inc.
+/* Copyright (C) 2015-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
 #include <sys/socket.h>
 
 #include <socketcall.h>
+#include <kernel-features.h>
+#include <sys/syscall.h>
 
 int
 __getsockname (int fd, __SOCKADDR_ARG addr, socklen_t *len)
 {
+#ifdef __ASSUME_GETSOCKNAME_SYSCALL
+  return INLINE_SYSCALL (getsockname, 3, fd, addr.__sockaddr__, len);
+#else
   return SOCKETCALL (getsockname, fd, addr.__sockaddr__, len);
+#endif
 }
 weak_alias (__getsockname, getsockname)