diff options
author | Paul Brook <paul@nowt.org> | 2022-01-26 20:26:36 +0000 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2022-01-27 16:58:33 +0100 |
commit | 33f53ac52ab664f3d6ec34047c0ae21e32fa26b4 (patch) | |
tree | 0c3783bfcb78f27e0e2ee4308b56de812f6753b5 /linux-user/fd-trans.c | |
parent | ca9946d734147155d6c27b348920125f623a588f (diff) |
linux-user: Fix inotify on aarch64
The inotify implementation originally called the raw host syscalls.
Commit 3b3f24add0 changed this to use the glibc wrappers. However ifdefs
in syscall.c still test for presence of the raw syscalls.
This causes a problem on e.g. aarch64 hosts which never had the
inotify_init syscall - it had been obsoleted by inotify_init1 before
aarch64 was invented! However it does have a perfectly good glibc
implementation of inotify_wait.
Fix this by removing all the raw __NR_inotify_* tests, and instead check
CONFIG_INOTIFY, which already tests for the glibc functionality we use.
Also remove the now-pointless sys_inotify* wrappers.
Tested using x86-64 inotifywatch on aarch64 host, and vice-versa
Signed-off-by: Paul Brook <paul@nowt.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20220126202636.655289-1-paul@nowt.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/fd-trans.c')
-rw-r--r-- | linux-user/fd-trans.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/linux-user/fd-trans.c b/linux-user/fd-trans.c index a17d05c079..7b25468d02 100644 --- a/linux-user/fd-trans.c +++ b/linux-user/fd-trans.c @@ -1644,9 +1644,8 @@ TargetFdTrans target_eventfd_trans = { .target_to_host_data = swap_data_eventfd, }; -#if (defined(TARGET_NR_inotify_init) && defined(__NR_inotify_init)) || \ - (defined(CONFIG_INOTIFY1) && defined(TARGET_NR_inotify_init1) && \ - defined(__NR_inotify_init1)) +#if defined(CONFIG_INOTIFY) && (defined(TARGET_NR_inotify_init) || \ + defined(TARGET_NR_inotify_init1)) static abi_long host_to_target_data_inotify(void *buf, size_t len) { struct inotify_event *ev; |