AC_CHECK_HEADERS([errno.h sys/types.h sys/un.h sys/wait.h sys/socket.h endian.h byteswap.h])
dnl Functions.
AC_CHECK_HEADERS([errno.h sys/types.h sys/un.h sys/wait.h sys/socket.h endian.h byteswap.h])
dnl Functions.
-AC_CHECK_FUNCS([posix_fallocate])
+AC_CHECK_FUNCS([futimens posix_fallocate])
dnl Build the daemon?
AC_MSG_CHECKING([if we should build the daemon])
dnl Build the daemon?
AC_MSG_CHECKING([if we should build the daemon])
int fd = open (filename, O_RDONLY);
if (fd == -1)
return 0;
int fd = open (filename, O_RDONLY);
if (fd == -1)
return 0;
(void) futimens (fd, NULL);
(void) futimens (fd, NULL);
+#else
+ (void) futimes (fd, NULL);
+#endif
struct flock fl;
fl.l_type = F_RDLCK;
fl.l_whence = SEEK_SET;
struct flock fl;
fl.l_type = F_RDLCK;
fl.l_whence = SEEK_SET;