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>
#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";
#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,