summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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>