From 014569c97a3b444a27f23e1b97ebc2bff69f2e1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lisandro=20Dami=C3=A1n=20Nicanor=20P=C3=A9rez=20Meyer?= Date: Wed, 19 Mar 2014 11:49:14 -0300 Subject: Add AArch64 support to qfilesystemwatcher_inotify.cpp Based on a patch by Marcin Juszkiewicz , licensed under CC0 (aka Public Domain) or BSD license. Backported from qtbase, commit d5dcd6d16647e4ecac239fa26ade5963f0e3f933 Change-Id: I0d01a129c039250ac33dc5f984baec9595786211 Reviewed-by: Dmitry Shachnev Reviewed-by: Thiago Macieira Reviewed-by: Lars Knoll --- src/corelib/io/qfilesystemwatcher_inotify.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp index 0b4ba61..58e0707 100644 --- a/src/corelib/io/qfilesystemwatcher_inotify.cpp +++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp @@ -138,6 +138,11 @@ # define __NR_inotify_add_watch 285 # define __NR_inotify_rm_watch 286 # define __NR_inotify_init1 328 +#elif defined (__aarch64__) +# define __NR_inotify_init1 26 +# define __NR_inotify_add_watch 27 +# define __NR_inotify_rm_watch 28 +// no inotify_init for aarch64 #else # error "This architecture is not supported. Please talk to qt-bugs@trolltech.com" #endif @@ -155,7 +160,11 @@ static inline int syscall(...) { return -1; } static inline int inotify_init() { +#ifdef __NR_inotify_init return syscall(__NR_inotify_init); +#else + return syscall(__NR_inotify_init1, 0); +#endif } static inline int inotify_add_watch(int fd, const char *name, __u32 mask) -- cgit v0.12