public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] dup3/dup3_02.c: fix O_CLOEXEC undeclared
@ 2014-01-03 10:49 zenglg.jy
  2014-01-07 13:54 ` Jan Stancek
  2014-01-08 12:57 ` chrubis
  0 siblings, 2 replies; 3+ messages in thread
From: zenglg.jy @ 2014-01-03 10:49 UTC (permalink / raw)
  To: ltp-list

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 <zenglg.jy@cn.fujitsu.com>
---
 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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-08 12:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-03 10:49 [LTP] [PATCH] dup3/dup3_02.c: fix O_CLOEXEC undeclared zenglg.jy
2014-01-07 13:54 ` Jan Stancek
2014-01-08 12:57 ` chrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox