This is to fix compilation on RHEL5.3:
  gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_FORTIFY_SOURCE=2
  -I/root/ltp/testcases/kernel/include -I../../../../include
  -I../../../../include   -L../../../../lib  dup3_02.c   -lltp -o dup3_02
  dup3_02.c:55: error: ‘O_CLOEXEC’ undeclared here (not in a function)
  make[4]: *** [dup3_02] Error 1
  make[4]: Leaving directory `/root/ltp/testcases/kernel/syscalls/dup3'
  make[3]: *** [all] Error 2

In similar manner as in dup3_01.c, define O_CLOEXEC if needed.

Signed-off-by: Jan Stancek <jstan...@redhat.com>
---
 testcases/kernel/syscalls/dup3/dup3_02.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/testcases/kernel/syscalls/dup3/dup3_02.c 
b/testcases/kernel/syscalls/dup3/dup3_02.c
index 0401ddc..3a455da 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.7.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

Reply via email to