summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-04-21 23:10:35 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:41 +0200
commit733810682b180134caf823d95a7820c7efe6e9d8 (patch)
treea0842ea51baabd171fed99495e50f30602c21e21 /libc/sysdeps/linux
parentd3b81557ecfbb8b08fba7fdab11af932d89b47b4 (diff)
ioctl.c: use cancel.h
Guard changed from NPTL to __NEW_THREADS to cover LT new as well. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/common/ioctl.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/libc/sysdeps/linux/common/ioctl.c b/libc/sysdeps/linux/common/ioctl.c
index f2f0f539a..9a00e614a 100644
--- a/libc/sysdeps/linux/common/ioctl.c
+++ b/libc/sysdeps/linux/common/ioctl.c
@@ -10,14 +10,7 @@
#include <sys/syscall.h>
#include <stdarg.h>
#include <sys/ioctl.h>
-
-#ifdef __UCLIBC_HAS_THREADS_NATIVE__
-#include <sysdep-cancel.h>
-#else
-#define SINGLE_THREAD_P 1
-#endif
-
-libc_hidden_proto(ioctl)
+#include <cancel.h>
#define __NR___syscall_ioctl __NR_ioctl
static __always_inline
@@ -30,17 +23,16 @@ int ioctl(int fd, unsigned long int request, ...)
va_start(list, request);
arg = va_arg(list, void *);
-
va_end(list);
if (SINGLE_THREAD_P)
return __syscall_ioctl(fd, request, arg);
-
-#ifdef __UCLIBC_HAS_THREADS_NATIVE__
+#ifdef __NEW_THREADS
int oldtype = LIBC_CANCEL_ASYNC ();
int result = __syscall_ioctl(fd, request, arg);
LIBC_CANCEL_RESET (oldtype);
return result;
#endif
}
-libc_hidden_def(ioctl)
+lt_strong_alias(ioctl)
+lt_libc_hidden(ioctl)