[CRIU] [PATCH] zdtm: Fix building for @_BSD_SOURCE redefinition

Cyrill Gorcunov gorcunov at openvz.org
Fri Sep 4 10:37:33 PDT 2015


Travis testing engine complained about @_BSD_SOURCE
which is not the case on my build environment.
Anyway lets do a safe thing -- conditional definition.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 test/zdtm/lib/fs.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/zdtm/lib/fs.h b/test/zdtm/lib/fs.h
index c574709dcc33..972c49b4a068 100644
--- a/test/zdtm/lib/fs.h
+++ b/test/zdtm/lib/fs.h
@@ -1,7 +1,10 @@
 #ifndef ZDTM_FS_H_
 #define ZDTM_FS_H_
 
-#define _BSD_SOURCE
+#ifndef _BSD_SOURCE
+# define _BSD_SOURCE
+#endif
+
 #include <sys/types.h>
 
 #include <limits.h>
-- 
2.4.3



More information about the CRIU mailing list