[PATCH v2 1/3] utest/tracefs-utest: include linux/limits.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Miko Larsson <mikoxyzzz@xxxxxxxxx>

This fixes the build with musl + clang >=15; musl doesn't define
PATH_MAX anywhere else, and clang >=15 doesn't allow implicit
declarations with >=c99. Without this, the build fails due to PATH_MAX
not being defined.

We could include limits.h from the libc, but AFAIK the libc doesn't
necessarily have to define PATH_MAX, so it's safer to just include
linux/limits.h

Fixes: 845f16976929 ("libtracefs: Add unit tests")
Signed-off-by: Miko Larsson <mikoxyzzz@xxxxxxxxx>
---
 utest/tracefs-utest.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/utest/tracefs-utest.c b/utest/tracefs-utest.c
index 963fac7..70bcf3e 100644
--- a/utest/tracefs-utest.c
+++ b/utest/tracefs-utest.c
@@ -16,6 +16,8 @@
 #include <kbuffer.h>
 #include <pthread.h>
 
+#include <linux/limits.h>
+
 #include <sys/mount.h>
 #include <sys/syscall.h>
 

-- 
2.43.0





[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux