From 12cca59aedb51aaffbe87c21f220ad815598c3d2 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Mon, 24 Aug 2015 09:38:03 +0000 Subject: [PATCH] Fix build on systems that lack O_CLOEXEC definition * xlat/efd_flags.in: Check that O_CLOEXEC is defined. * xlat/epollflags.in: Likewise. * xlat/sfd_flags.in: Likewise. * xlat/timerfdflags.in: Fix O_CLOEXEC check. --- xlat/efd_flags.in | 2 ++ xlat/epollflags.in | 2 ++ xlat/sfd_flags.in | 2 ++ xlat/timerfdflags.in | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/xlat/efd_flags.in b/xlat/efd_flags.in index 0db0ade6..258fb9f0 100644 --- a/xlat/efd_flags.in +++ b/xlat/efd_flags.in @@ -1,3 +1,5 @@ EFD_SEMAPHORE 1 +#if defined EFD_CLOEXEC || defined O_CLOEXEC EFD_CLOEXEC O_CLOEXEC +#endif EFD_NONBLOCK O_NONBLOCK diff --git a/xlat/epollflags.in b/xlat/epollflags.in index 4f6b192f..e7ebaafd 100644 --- a/xlat/epollflags.in +++ b/xlat/epollflags.in @@ -1 +1,3 @@ +#if defined EPOLL_CLOEXEC || defined O_CLOEXEC EPOLL_CLOEXEC O_CLOEXEC +#endif diff --git a/xlat/sfd_flags.in b/xlat/sfd_flags.in index badd55da..20a5d1f8 100644 --- a/xlat/sfd_flags.in +++ b/xlat/sfd_flags.in @@ -1,2 +1,4 @@ +#if defined SFD_CLOEXEC || defined O_CLOEXEC SFD_CLOEXEC O_CLOEXEC +#endif SFD_NONBLOCK O_NONBLOCK diff --git a/xlat/timerfdflags.in b/xlat/timerfdflags.in index 6c934bdc..bf767e3f 100644 --- a/xlat/timerfdflags.in +++ b/xlat/timerfdflags.in @@ -2,7 +2,7 @@ TFD_TIMER_ABSTIME (1 << 0) TFD_TIMER_CANCEL_ON_SET (1 << 1) -#ifdef O_CLOEXEC +#if defined TFD_CLOEXEC || defined O_CLOEXEC TFD_CLOEXEC O_CLOEXEC #endif TFD_NONBLOCK O_NONBLOCK -- 2.50.1