O_CLOEXEC is not defined in RHEL5. When execute make,
"dup3_02.c:55: error: ‘O_CLOEXEC’ undeclared here (not in a function)"
will be outputed.

Signed-off-by: Zeng Linggang <[email protected]>
---
 testcases/kernel/syscalls/dup3/dup3_02.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/testcases/kernel/syscalls/dup3/dup3_02.c 
b/testcases/kernel/syscalls/dup3/dup3_02.c
index 0401ddc..9d5ef15 100644
--- a/testcases/kernel/syscalls/dup3/dup3_02.c
+++ b/testcases/kernel/syscalls/dup3/dup3_02.c
@@ -37,6 +37,9 @@
 #include "safe_macros.h"
 #include "linux_syscall_numbers.h"
 
+#ifndef O_CLOEXEC
+# define O_CLOEXEC 02000000
+#endif
 
 static void setup(void);
 static void cleanup(void);
-- 
1.8.2.1




------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to