[LTP] [PATCH V3 19/23] creat06: Include limits.h for PATH_MAX

Khem Raj raj.khem@gmail.com
Fri Jul 22 06:26:52 CEST 2016


Glibc includes limits.h indirectly and this error goes hidden
but musl is less pardoning

Fixes errors like

creat06.c:81:23: error: ‘PATH_MAX’ undeclared here (not in a function)
 static char long_name[PATH_MAX+2];
                       ^~~~~~~~

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 testcases/kernel/syscalls/creat/creat06.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/testcases/kernel/syscalls/creat/creat06.c b/testcases/kernel/syscalls/creat/creat06.c
index bb27d03..165c1de 100644
--- a/testcases/kernel/syscalls/creat/creat06.c
+++ b/testcases/kernel/syscalls/creat/creat06.c
@@ -51,6 +51,7 @@
 
 #include <errno.h>
 #include <string.h>
+#include <limits.h>
 #include <pwd.h>
 #include <sys/mman.h>
 #include <sys/types.h>
-- 
2.9.0



More information about the ltp mailing list