summaryrefslogtreecommitdiff
path: root/libc/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2013-09-06 21:34:38 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2013-09-06 21:34:38 +0000
commit3f53fdce0a27a5c46127517c88c127d7e5904c81 (patch)
treeec1f99ed6263014c23f67fe7ed2cf289527ea1a9 /libc/sysdeps/unix/sysv/linux
parenta977505d8d09aa864a06433dac8bcb3ff92a30fe (diff)
Merge changes between r23927 and r23946 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@23947 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/sysdeps/unix/sysv/linux')
-rw-r--r--libc/sysdeps/unix/sysv/linux/bits/in.h12
-rw-r--r--libc/sysdeps/unix/sysv/linux/tst-fanotify.c13
2 files changed, 20 insertions, 5 deletions
diff --git a/libc/sysdeps/unix/sysv/linux/bits/in.h b/libc/sysdeps/unix/sysv/linux/bits/in.h
index e959b33ea..d763ce9fc 100644
--- a/libc/sysdeps/unix/sysv/linux/bits/in.h
+++ b/libc/sysdeps/unix/sysv/linux/bits/in.h
@@ -21,6 +21,18 @@
# error "Never use <bits/in.h> directly; include <netinet/in.h> instead."
#endif
+/* If the application has already included linux/in6.h from a linux-based
+ kernel then we will not define the IPv6 IPPROTO_* defines, in6_addr (nor the
+ defines), sockaddr_in6, or ipv6_mreq. The ABI used by the linux-kernel and
+ glibc match exactly. Neither the linux kernel nor glibc should break this
+ ABI without coordination. */
+#ifdef _UAPI_LINUX_IN6_H
+/* This is not quite the same API since the kernel always defines s6_addr16 and
+ s6_addr32. This is not a violation of POSIX since POSIX says "at least the
+ following member" and that holds true. */
+# define __USE_KERNEL_IPV6_DEFS
+#endif
+
/* Options for use with `getsockopt' and `setsockopt' at the IP level.
The first word in the comment at the right is the data type used;
"bool" means a boolean value stored in an `int'. */
diff --git a/libc/sysdeps/unix/sysv/linux/tst-fanotify.c b/libc/sysdeps/unix/sysv/linux/tst-fanotify.c
index b88995d6f..b21e160ca 100644
--- a/libc/sysdeps/unix/sysv/linux/tst-fanotify.c
+++ b/libc/sysdeps/unix/sysv/linux/tst-fanotify.c
@@ -29,11 +29,14 @@ do_test (void)
fd = fanotify_init (0, 0);
if (fd < 0)
{
- if (errno == ENOSYS)
- {
- puts ("SKIP: missing support for fanotify (check CONFIG_FANOTIFY=y)");
- return 0;
- }
+ switch (errno) {
+ case ENOSYS:
+ puts ("SKIP: missing support for fanotify (check CONFIG_FANOTIFY=y)");
+ return 0;
+ case EPERM:
+ puts ("SKIP: missing proper permissions for runtime test");
+ return 0;
+ }
perror ("fanotify_init (0, 0) failed");
return 1;