summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2020-06-27 12:41:21 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2020-06-27 12:41:21 +0100
commit50ef79ad104a8bd26fb21504c13f7e4866824098 (patch)
treee98991382ae6694c5dd5bffc1160dde8ee6ae19c
parentcb6df646091bdc096e35f75be91d361cc38d06fc (diff)
Build: separate guard for futimens()
Darwin does not have the data element we manipulate with futimens()
-rw-r--r--src/OS/os.h-FreeBSD1
-rw-r--r--src/OS/os.h-Linux1
-rw-r--r--src/OS/os.h-OpenBSD1
-rw-r--r--src/OS/os.h-SunOS51
-rw-r--r--src/src/exim_lock.c2
5 files changed, 5 insertions, 1 deletions
diff --git a/src/OS/os.h-FreeBSD b/src/OS/os.h-FreeBSD
index 548a82d4b..c1720a796 100644
--- a/src/OS/os.h-FreeBSD
+++ b/src/OS/os.h-FreeBSD
@@ -15,6 +15,7 @@
#define HAVE_SRANDOMDEV
#define HAVE_ARC4RANDOM
#define EXIM_HAVE_OPENAT
+#define EXIM_HAVE_FUTIMENS
/* Applications should not call arc4random_stir() explicitly after
* FreeBSD r227520 (approximately 1000002).
diff --git a/src/OS/os.h-Linux b/src/OS/os.h-Linux
index ba5f13450..4a141346d 100644
--- a/src/OS/os.h-Linux
+++ b/src/OS/os.h-Linux
@@ -73,6 +73,7 @@ then change the 0 to 1 in the next block. */
#if _POSIX_C_SOURCE >= 200809L || _ATFILE_SOURCE
# define EXIM_HAVE_OPENAT
+# define EXIM_HAVE_FUTIMENS
#endif
/* TCP Fast Open support */
diff --git a/src/OS/os.h-OpenBSD b/src/OS/os.h-OpenBSD
index dc5dc0233..f599c09e4 100644
--- a/src/OS/os.h-OpenBSD
+++ b/src/OS/os.h-OpenBSD
@@ -8,6 +8,7 @@
#define HAVE_SYS_MOUNT_H
#define SIOCGIFCONF_GIVES_ADDR
#define EXIM_HAVE_OPENAT
+#define EXIM_HAVE_FUTIMENS
#define HAVE_ARC4RANDOM
/* In May 2014, OpenBSD 5.5 was released which cleaned up the arc4random_* API
which removed the arc4random_stir() function. Set NOT_HAVE_ARC4RANDOM_STIR
diff --git a/src/OS/os.h-SunOS5 b/src/OS/os.h-SunOS5
index 6331f3701..f5bc31668 100644
--- a/src/OS/os.h-SunOS5
+++ b/src/OS/os.h-SunOS5
@@ -9,6 +9,7 @@
#define HAVE_GETIPNODEBYNAME 1
#define HAVE_GETIPNODEBYADDR 1
#define EXIM_HAVE_OPENAT
+#define EXIM_HAVE_FUTIMENS
#define HAVE_KSTAT
#define LOAD_AVG_KSTAT "system_misc"
diff --git a/src/src/exim_lock.c b/src/src/exim_lock.c
index 068216816..2624aff5e 100644
--- a/src/src/exim_lock.c
+++ b/src/src/exim_lock.c
@@ -584,7 +584,7 @@ else
if (restore_times)
{
struct stat strestore;
-#ifdef EXIM_HAVE_OPENAT
+#ifdef EXIM_HAVE_FUTIMENS
int fd = open(filename, O_RDWR); /* use fd for both get & restore */
struct timespec tt[2];