[LTP] [PATCH] lapi/name_to_handle_at.h: Fix compiler error on centos6

Xiao Yang yangx.jy@cn.fujitsu.com
Thu Nov 26 02:28:38 CET 2020


>From travis-ci, compiling name_to_handle_at/open_by_handle_at tests
failed on centos6 due to undefined AT_EMPTY_PATH and MAX_HANDLE_SZ.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 include/lapi/fcntl.h             | 4 ++++
 include/lapi/name_to_handle_at.h | 1 +
 2 files changed, 5 insertions(+)

diff --git a/include/lapi/fcntl.h b/include/lapi/fcntl.h
index 576a18daf..d6665915f 100644
--- a/include/lapi/fcntl.h
+++ b/include/lapi/fcntl.h
@@ -136,4 +136,8 @@
 # define SPLICE_F_NONBLOCK 2
 #endif
 
+#ifndef MAX_HANDLE_SZ
+# define MAX_HANDLE_SZ	128
+#endif
+
 #endif /* __LAPI_FCNTL_H__ */
diff --git a/include/lapi/name_to_handle_at.h b/include/lapi/name_to_handle_at.h
index c0759c463..3484133d1 100644
--- a/include/lapi/name_to_handle_at.h
+++ b/include/lapi/name_to_handle_at.h
@@ -10,6 +10,7 @@
 #include <sys/syscall.h>
 #include "config.h"
 #include "lapi/syscalls.h"
+#include "lapi/fcntl.h"
 #include "tst_buffers.h"
 #include "tst_test.h"
 
-- 
2.25.1





More information about the ltp mailing list