diff options
| author | Mike Frysinger <vapier@gentoo.org> | 2009-10-07 22:51:55 -0400 |
|---|---|---|
| committer | Austin Foxley <austinf@cetoncorp.com> | 2009-10-16 11:41:34 -0700 |
| commit | b64182025763b4c47eacfe59ea8c0f6c3714ae72 (patch) | |
| tree | 7f9f19d84bfd0a02822fdce82f6db01b30f0250b /libc/sysdeps/linux/common/bits/kernel-features.h | |
| parent | dba14eb59fa558eee0439dde7f98c9fd49bccb4c (diff) | |
| download | uClibc-alpine-b64182025763b4c47eacfe59ea8c0f6c3714ae72.tar.bz2 uClibc-alpine-b64182025763b4c47eacfe59ea8c0f6c3714ae72.tar.xz | |
clean up O_CLOEXEC handling
Drop the "#ifndef O_CLOEXEC" cruft, enable O_CLOEXEC in most fcntl.h
headers, and import __ASSUME_O_CLOEXEC from glibc.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libc/sysdeps/linux/common/bits/kernel-features.h')
| -rw-r--r-- | libc/sysdeps/linux/common/bits/kernel-features.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/bits/kernel-features.h b/libc/sysdeps/linux/common/bits/kernel-features.h index 1f6ca094b..923341b35 100644 --- a/libc/sysdeps/linux/common/bits/kernel-features.h +++ b/libc/sysdeps/linux/common/bits/kernel-features.h @@ -296,6 +296,14 @@ # define __ASSUME_CLONE_THREAD_FLAGS 1 #endif +/* Support for various CLOEXEC and NONBLOCK flags was added for x86, + x86-64, PPC, IA-64, SPARC< and S390 in 2.6.23. */ +#if __LINUX_KERNEL_VERSION >= 0x020617 \ + && (defined __i386__ || defined __x86_64__ || defined __powerpc__ \ + || defined __ia64__ || defined __sparc__ || defined __s390__) +# define __ASSUME_O_CLOEXEC 1 +#endif + /* These features were surely available with 2.4.12. */ #if __LINUX_KERNEL_VERSION >= 132108 && defined __mc68000__ # define __ASSUME_MMAP2_SYSCALL 1 |
