Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c61d70e authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

perf tools: Move conditional O_CLOEXEC to util.h

To be more generally available and get the build on centos:5 to
work after we use O_CLOEXEC in the next patch, in the util/dso.c file.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: Wang YanQing <udknight@gmail.com>
Link: https://lkml.kernel.org/n/tip-vsjbiydh15pfqomxw1kx64ex@git.kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 87252323
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -12,16 +12,6 @@
#include "util.h"
#include "debug.h"

#ifndef O_CLOEXEC
#ifdef __sparc__
#define O_CLOEXEC	0x400000
#elif defined(__alpha__) || defined(__hppa__)
#define O_CLOEXEC	010000000
#else
#define O_CLOEXEC	02000000
#endif
#endif

static bool check_pipe(struct perf_data *data)
{
	struct stat st;
+10 −0
Original line number Diff line number Diff line
@@ -68,4 +68,14 @@ extern bool perf_singlethreaded;
void perf_set_singlethreaded(void);
void perf_set_multithreaded(void);

#ifndef O_CLOEXEC
#ifdef __sparc__
#define O_CLOEXEC      0x400000
#elif defined(__alpha__) || defined(__hppa__)
#define O_CLOEXEC      010000000
#else
#define O_CLOEXEC      02000000
#endif
#endif

#endif /* GIT_COMPAT_UTIL_H */