skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

commit 07d4bba8f4db6e5acee28f83fd7f60fa04e58737
parent 64ee50fa0e4357164273c5d8b34ccde10a69d0ef
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date:   Wed, 27 Apr 2016 16:56:42 +0000

 futimes() is not POSIX, so add some ftms

Diffstat:
Msrc/libstddjb/touch.c | 5++++-
Msrc/sysdeps/tryfutimes.c | 4++++
2 files changed, 8 insertions(+), 1 deletion(-)

diff --git 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 @@ -1,5 +1,9 @@ /* ISC license. */ +#ifndef _BSD_SOURCE +#define _BSD_SOURCE +#endif + #include <sys/types.h> #include <sys/time.h>