summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorDmitry Shachnev <mitya57@gmail.com>2014-03-13 19:49:33 +0400
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-14 22:40:02 +0100
commitd5dcd6d16647e4ecac239fa26ade5963f0e3f933 (patch)
treefa00c431d1d8db29db934f116a0c3963afc9d4a6 /src/corelib
parent391c2c12abb66c6edcdac511be4ca126aeaf3377 (diff)
Add AArch64 support to qfilesystemwatcher_inotify.cpp
Based on a patch by Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>, licensed under CC0 (aka Public Domain) or BSD license. Change-Id: I60815d6893c7a9d2873864ff626b865881ec5ee9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qfilesystemwatcher_inotify.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp
index 5fd20c6d74..3031c7a27e 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 see http://www.qt-project.org/"
#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)