diff options
author | Dmitry V. Levin <ldv@strace.io> | 2021-02-16 08:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2021-02-16 08:00:00 +0000 |
commit | 9286732e7a905a487482aa373b93acaac0ad5bed (patch) | |
tree | c6f98947581ff6f28d5b85e5f2fc8a33bde0579c /src/epoll.c | |
parent | c4cff2a7a66629bd95fda9bada84a639c59cda3c (diff) | |
download | strace-9286732e7a905a487482aa373b93acaac0ad5bed.tar.gz |
Switch to use bundled <asm-generic/fcntl.h> and <asm/fcntl.h>
Linux kernel commit v5.10-rc1~111^2~13 changed the value of O_NONBLOCK
on hppa from 0200004 to 0200000, breaking the following build assertion:
xlat/open_mode_flags.h:158:1: error: static assertion failed: "O_NONBLOCK != 0200004"
Address this issue by switching to use bundled fcntl.h files where
appropriate.
* NEWS: Mention this.
* bundled/linux/include/uapi/asm-generic/fcntl.h: New file, copied
from Linux kernel v5.11.
* bundled/linux/arch/alpha/include/uapi/asm/fcntl.h: Likewise.
* bundled/linux/arch/arm/include/uapi/asm/fcntl.h: Likewise.
* bundled/linux/arch/arm64/include/uapi/asm/fcntl.h: Likewise.
* bundled/linux/arch/ia64/include/uapi/asm/fcntl.h: Likewise.
* bundled/linux/arch/m68k/include/uapi/asm/fcntl.h: Likewise.
* bundled/linux/arch/mips/include/uapi/asm/fcntl.h: Likewise.
* bundled/linux/arch/parisc/include/uapi/asm/fcntl.h: Likewise.
* bundled/linux/arch/powerpc/include/uapi/asm/fcntl.h: Likewise.
* bundled/linux/arch/sparc/include/uapi/asm/fcntl.h: Likewise.
* bundled/Makefile.am (EXTRA_DIST): Add them.
(dist-hook): New rule.
* configure.ac: Invoke AC_PROG_LN_S.
* src/kernel_fcntl.h: New file.
* src/Makefile.am (libstrace_a_SOURCES): Add kernel_fcntl.h.
* src/open.c: Include "kernel_fcntl.h" instead of <asm/fcntl.h>,
remove redefinitions of O_ACCMODE and O_LARGEFILE.
* src/open_tree.c: Include "kernel_fcntl.h" instead of
"xlat/open_mode_flags.h".
* src/bjm.c: Include "kernel_fcntl.h" instead of <fcntl.h>.
* src/epoll.c: Likewise.
* src/inotify.c: Likewise.
* src/pidfd_open.c: Likewise.
* src/time.c: Likewise.
* src/userfaultfd.c: Likewise.
* src/eventfd.c: Include "kernel_fcntl.h" instead of <fcntl.h> and
<sys/eventfd.h>.
* src/signalfd.c: Include "kernel_fcntl.h" instead of <fcntl.h> and
<sys/signalfd.h>.
* src/xlat/open_mode_flags.in: Add #unconditional, remove fallback
definitions.
(O_ASYNC, O_RSYNC, O_NDELAY): Remove.
* src/xlat/open_access_modes.in: remove fallback definitions.
* src/xlat/efd_flags.in (EFD_CLOEXEC): Define unconditionally.
* src/xlat/epollflags.in (EPOLL_CLOEXEC): Likewise.
* src/xlat/inotify_init_flags.in (IN_CLOEXEC): Likewise.
* src/xlat/sfd_flags.in (SFD_CLOEXEC): Likewise.
* src/xlat/timerfdflags.in (TFD_CLOEXEC): Likewise.
* tests/dup3.c: Include "kernel_fcntl.h" instead of <fcntl.h>,
assume O_CLOEXEC is defined.
(main) [__sparc__]: Remove special handling of O_NDELAY.
* tests/mq_sendrecv.c: Include "kernel_fcntl.h" instead of <fcntl.h>.
(main): Replace S_IRWXU with 0700.
* tests/accept4.c: Include "kernel_fcntl.h" instead of <fcntl.h>,
assume O_CLOEXEC is defined.
* tests/epoll_create1.c: Likewise.
* tests/eventfd.c: Likewise.
* tests/inotify_init1.c: Likewise.
* tests/signalfd4.c: Likewise.
* tests/timerfd_xettime.c: Likewise.
* tests/userfaultfd.c: Likewise.
* tests/delete_module.c: Include "kernel_fcntl.h" instead of <fcntl.h>.
* tests/pipe2.c: Likewise.
* tests/open_tree.c: Include "kernel_fcntl.h", assume O_CLOEXEC is
defined.
* tests/pidfd_open.c: Include "kernel_fcntl.h".
Diffstat (limited to 'src/epoll.c')
-rw-r--r-- | src/epoll.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/epoll.c b/src/epoll.c index 80f2ed511..1c608edf8 100644 --- a/src/epoll.c +++ b/src/epoll.c @@ -9,7 +9,7 @@ */ #include "defs.h" -#include <fcntl.h> +#include "kernel_fcntl.h" #include <sys/epoll.h> SYS_FUNC(epoll_create) |