[RFC PATCH 1/1] tests: add missing <stdint.h> in fanotify_mark.c

Jonathan Borne jborne at kalray.eu
Mon Feb 7 13:57:12 UTC 2022


With musl libc, fanotify_mark.c compilation fails
with ‘uintptr_t’ undeclared.

Following POSIX specification uintptr_t should be
defined in <stdint.h>. However 'fanotify_mark.c'
does not include <stdint.h> directly.
Instead, it includes 'fanotify.h'.
With glibc or uclibc-ng, compilation works because
the provided 'fanotify.h' includes <stdint.h>.
This is not the case in musl libc.

Adding <stdint.h> to fanotify_mark.c resolve
the problem.

Signed-off-by: Jonathan Borne <jborne at kalray.eu>
---
 tests/fanotify_mark.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/fanotify_mark.c b/tests/fanotify_mark.c
index 59c2ff07a..bfdf48a1e 100644
--- a/tests/fanotify_mark.c
+++ b/tests/fanotify_mark.c
@@ -17,6 +17,7 @@
 # include <limits.h>
 # include <stdio.h>
 # include <unistd.h>
+# include <stdint.h>
 # include <sys/fanotify.h>
 
 # include "secontext.h"
-- 
2.17.1







More information about the Strace-devel mailing list