]> git.proxmox.com Git - mirror_lxc.git/commitdiff
locally define O_CLOEXEC
authorMichel Normand <normand@fr.ibm.com>
Fri, 24 Apr 2009 09:32:58 +0000 (11:32 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Fri, 24 Apr 2009 09:32:58 +0000 (11:32 +0200)
this is a required patch to be able to compile lxc on a RedHat 5 update 1
which has such define.
This is also required for the F_DUPFD_CLOEXEC define

Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/log.c
src/lxc/log.h

index d5703eb6947fd43624f5ccc9b6a396b8782a34d2..24a9d0048d5cc061b353af9e84b811aee239a67f 100644 (file)
@@ -13,9 +13,6 @@
 
 #include <lxc/log.h>
 
-#define LXC_LOG_PREFIX_SIZE    32
-#define LXC_LOG_BUFFER_SIZE    512
-
 static __thread int lxc_log_fd = 2;
 static __thread char log_prefix[LXC_LOG_PREFIX_SIZE] = "lxc";
 
index 1e3f5ee163c0daa9eddeefe966da721596ad3b30..d8aafc0b5820bd3684bf3bb828684a1116d5d5ed 100644 (file)
@@ -6,6 +6,17 @@
 #include <sys/time.h>
 #include <string.h>
 
+#ifndef O_CLOEXEC
+#define O_CLOEXEC 02000000
+#endif
+
+#ifndef F_DUPFD_CLOEXEC
+#define F_DUPFD_CLOEXEC 1030
+#endif
+
+#define LXC_LOG_PREFIX_SIZE    32
+#define LXC_LOG_BUFFER_SIZE    512
+
 /* predefined priorities. */
 enum {
        LXC_LOG_PRIORITY_TRACE,