summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2016-04-27 16:56:42 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2016-04-27 16:56:42 +0000
commit07d4bba8f4db6e5acee28f83fd7f60fa04e58737 (patch)
tree2b9cfa631e5b29b52d609335a531b507d6f7f41d /src
parent64ee50fa0e4357164273c5d8b34ccde10a69d0ef (diff)
downloadskalibs-07d4bba8f4db6e5acee28f83fd7f60fa04e58737.tar.xz
futimes() is not POSIX, so add some ftms
Diffstat (limited to 'src')
-rw-r--r--src/libstddjb/touch.c5
-rw-r--r--src/sysdeps/tryfutimes.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/src/libstddjb/touch.c b/src/libstddjb/touch.c
index dfc3525..57e0d0d 100644
--- a/src/libstddjb/touch.c
+++ b/src/libstddjb/touch.c
@@ -1,12 +1,12 @@
/* ISC license. */
#include <skalibs/sysdeps.h>
-#include <skalibs/djbunix.h>
#ifdef SKALIBS_HASFUTIMENS
#include <time.h>
#include <sys/stat.h>
+#include <skalibs/djbunix.h>
int touch (char const *file)
{
@@ -20,7 +20,9 @@ int touch (char const *file)
#else
#ifdef SKALIBS_HASFUTIMES
+#include <skalibs/nonposix.h>
#include <sys/time.h>
+#include <skalibs/djbunix.h>
int touch (char const *file)
{
@@ -34,6 +36,7 @@ int touch (char const *file)
#else
#include <sys/time.h>
+#include <skalibs/djbunix.h>
int touch (char const *file)
{
diff --git a/src/sysdeps/tryfutimes.c b/src/sysdeps/tryfutimes.c
index a65ab5a..7e0370b 100644
--- a/src/sysdeps/tryfutimes.c
+++ b/src/sysdeps/tryfutimes.c
@@ -1,5 +1,9 @@
/* ISC license. */
+#ifndef _BSD_SOURCE
+#define _BSD_SOURCE
+#endif
+
#include <sys/types.h>
#include <sys/time.h>