[exim-cvs] Build: separate guard for futimens()

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Exim Git Commits Mailing List
Datum:  
To: exim-cvs
Betreff: [exim-cvs] Build: separate guard for futimens()
Gitweb: https://git.exim.org/exim.git/commitdiff/50ef79ad104a8bd26fb21504c13f7e4866824098
Commit:     50ef79ad104a8bd26fb21504c13f7e4866824098
Parent:     cb6df646091bdc096e35f75be91d361cc38d06fc
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sat Jun 27 12:41:21 2020 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sat Jun 27 12:41:21 2020 +0100


    Build: separate guard for futimens()


    Darwin does not have the data element we manipulate with futimens()
---
 src/OS/os.h-FreeBSD | 1 +
 src/OS/os.h-Linux   | 1 +
 src/OS/os.h-OpenBSD | 1 +
 src/OS/os.h-SunOS5  | 1 +
 src/src/exim_lock.c | 2 +-
 5 files changed, 5 insertions(+), 1 deletion(-)


diff --git a/src/OS/os.h-FreeBSD b/src/OS/os.h-FreeBSD
index 548a82d..c1720a7 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 ba5f134..4a14134 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 dc5dc02..f599c09 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 6331f37..f5bc316 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 0682168..2624aff 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];