Commit eabbb2f0 by Michel Normand Committed by Daniel Lezcano

locally define O_CLOEXEC

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: 's avatarMichel Normand <normand@fr.ibm.com> Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 2c9bd007
...@@ -13,9 +13,6 @@ ...@@ -13,9 +13,6 @@
#include <lxc/log.h> #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 int lxc_log_fd = 2;
static __thread char log_prefix[LXC_LOG_PREFIX_SIZE] = "lxc"; static __thread char log_prefix[LXC_LOG_PREFIX_SIZE] = "lxc";
......
...@@ -6,6 +6,17 @@ ...@@ -6,6 +6,17 @@
#include <sys/time.h> #include <sys/time.h>
#include <string.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. */ /* predefined priorities. */
enum { enum {
LXC_LOG_PRIORITY_TRACE, LXC_LOG_PRIORITY_TRACE,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment