Commit 3193e894 authored by Brahmajit Das's avatar Brahmajit Das Committed by Jan Kara
Browse files

samples: fix building fs-monitor on musl systems

samples/fanotify/fs-monitor.c:22:9: error: unknown type name '__s32'
   22 |         __s32 error;
      |         ^~~~~
samples/fanotify/fs-monitor.c:23:9: error: unknown type name '__u32'
   23 |         __u32 error_count;
      |         ^~~~~
samples/fanotify/fs-monitor.c: In function 'handle_notifications':
samples/fanotify/fs-monitor.c:98:50: error: 'fsid_t' has no member named 'val';
did you mean '__val'?
   98 |                                        fid->fsid.val[0],
fid->fsid.val[1]);
      |                                                  ^~~
      |                                                  __val
samples/fanotify/fs-monitor.c:98:68: error: 'fsid_t' has no member named 'val';
did you mean '__val'?
   98 |                                        fid->fsid.val[0],
fid->fsid.val[1]);
      |                                                                    ^~~
      |                                                                    __val

This is due to sys/fanotify.h on musl does not include
linux/fanotify.h[0] unlike glibc which includes it. This also results in
fsid not being of type __kernel_fsid_t, rather the libc's definition of
it which does not have val, but instead __val.

[0]: https://git.musl-libc.org/cgit/musl/tree/include/sys/fanotify.h


Signed-off-by: default avatarBrahmajit Das <listout@listout.xyz>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20250630103011.27484-1-listout@listout.xyz
parent 8631e01c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment