summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
authorLisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>2014-03-19 11:49:14 -0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-24 13:57:14 +0100
commit014569c97a3b444a27f23e1b97ebc2bff69f2e1b (patch)
tree0a0606bb9e24730c20982ff1bee94350c6f7530b /src/corelib
parent65656e03896d12c6dbc37a2ae7d30ec257c26092 (diff)
downloadqt4-tools-014569c97a3b444a27f23e1b97ebc2bff69f2e1b.tar.gz
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. Backported from qtbase, commit d5dcd6d16647e4ecac239fa26ade5963f0e3f933 Change-Id: I0d01a129c039250ac33dc5f984baec9595786211 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> 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 0b4ba61f57..58e07075a5 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)