Skip to content

Commit

Permalink
Add AArch64 support to qfilesystemwatcher_inotify.cpp
Browse files Browse the repository at this point in the history
Based on a patch by Marcin Juszkiewicz <[email protected]>,
licensed under CC0 (aka Public Domain) or BSD license.

Backported from qtbase, commit d5dcd6d16647e4ecac239fa26ade5963f0e3f933

Change-Id: I0d01a129c039250ac33dc5f984baec9595786211
Reviewed-by: Dmitry Shachnev <[email protected]>
Reviewed-by: Thiago Macieira <[email protected]>
Reviewed-by: Lars Knoll <[email protected]>
  • Loading branch information
perezmeyer authored and The Qt Project committed Mar 24, 2014
1 parent 65656e0 commit 014569c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/corelib/io/qfilesystemwatcher_inotify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]"
#endif
Expand All @@ -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)
Expand Down

0 comments on commit 014569c

Please sign in to comment.