summaryrefslogtreecommitdiff
path: root/samples/fanotify/fs-monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/fanotify/fs-monitor.c')
-rw-r--r--samples/fanotify/fs-monitor.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/samples/fanotify/fs-monitor.c b/samples/fanotify/fs-monitor.c
index 608db24c471e..28c0a652ffeb 100644
--- a/samples/fanotify/fs-monitor.c
+++ b/samples/fanotify/fs-monitor.c
@@ -12,6 +12,9 @@
#include <sys/fanotify.h>
#include <sys/types.h>
#include <unistd.h>
+#ifndef __GLIBC__
+#include <asm-generic/int-ll64.h>
+#endif
#ifndef FAN_FS_ERROR
#define FAN_FS_ERROR 0x00008000
@@ -95,7 +98,11 @@ static void handle_notifications(char *buffer, int len)
fid = (struct fanotify_event_info_fid *) info;
printf("\tfsid: %x%x\n",
+#if defined(__GLIBC__)
fid->fsid.val[0], fid->fsid.val[1]);
+#else
+ fid->fsid.__val[0], fid->fsid.__val[1]);
+#endif
print_fh((struct file_handle *) &fid->handle);
break;