From: Michel Normand Date: Fri, 24 Apr 2009 09:32:58 +0000 (+0200) Subject: locally define O_CLOEXEC X-Git-Tag: lxc_0_6_2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eabbb2f0c0cc1c0fe15efef514cc37e4c60725ae;p=thirdparty%2Flxc.git 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: Michel Normand Signed-off-by: Daniel Lezcano --- diff --git a/src/lxc/log.c b/src/lxc/log.c index d5703eb69..24a9d0048 100644 --- a/src/lxc/log.c +++ b/src/lxc/log.c @@ -13,9 +13,6 @@ #include -#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"; diff --git a/src/lxc/log.h b/src/lxc/log.h index 1e3f5ee16..d8aafc0b5 100644 --- a/src/lxc/log.h +++ b/src/lxc/log.h @@ -6,6 +6,17 @@ #include #include +#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,