Implement futimes for Solaris using futimesat.
diff --git a/configure b/configure
index e2c4d8b..c42fe23 100755
--- a/configure
+++ b/configure
@@ -16384,6 +16384,7 @@
+
for ac_func in \
_lwp_create \
_lwp_self \
@@ -16405,6 +16406,7 @@
fstatvfs \
ftruncate \
futimes \
+ futimesat \
getnetbyname \
getopt_long \
getpagesize \
diff --git a/configure.ac b/configure.ac
index f6d908c..2b257d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1143,6 +1143,7 @@
fstatvfs \
ftruncate \
futimes \
+ futimesat \
getnetbyname \
getopt_long \
getpagesize \
diff --git a/include/config.h.in b/include/config.h.in
index a447067..80548cc 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -158,6 +158,9 @@
/* Define to 1 if you have the `futimes' function. */
#undef HAVE_FUTIMES
+/* Define to 1 if you have the `futimesat' function. */
+#undef HAVE_FUTIMESAT
+
/* Define to 1 if you have the `gethostbyname' function. */
#undef HAVE_GETHOSTBYNAME
diff --git a/libs/port/futimes.c b/libs/port/futimes.c
index f5d8f04..00e2a55 100644
--- a/libs/port/futimes.c
+++ b/libs/port/futimes.c
@@ -43,6 +43,8 @@
return utime( buffer, &ut );
}
else return utime( buffer, NULL );
+#elif defined(HAVE_FUTIMESAT)
+ return futimesat( fd, NULL, tv );
#else
errno = ENOSYS;
return -1;