summaryrefslogtreecommitdiff
path: root/src/sysdeps
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2016-04-27 16:47:14 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2016-04-27 16:47:14 +0000
commit64ee50fa0e4357164273c5d8b34ccde10a69d0ef (patch)
tree0fef90a4e49a9eb2caa17bd3a665fba1d71479d1 /src/sysdeps
parent70697efff43ca5f2061d45a25abb839ad37fb3bf (diff)
downloadskalibs-64ee50fa0e4357164273c5d8b34ccde10a69d0ef.tar.xz
Add new sysdeps for futimens() and futimes(), adapt touch() implementation
Diffstat (limited to 'src/sysdeps')
-rw-r--r--src/sysdeps/tryfutimens.c12
-rw-r--r--src/sysdeps/tryfutimes.c11
2 files changed, 23 insertions, 0 deletions
diff --git a/src/sysdeps/tryfutimens.c b/src/sysdeps/tryfutimens.c
new file mode 100644
index 0000000..809aaa5
--- /dev/null
+++ b/src/sysdeps/tryfutimens.c
@@ -0,0 +1,12 @@
+/* ISC license. */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <time.h>
+
+int main (void)
+{
+ struct timespec foo[2] = { { .tv_sec = 0, .tv_nsec = 0 }, { .tv_sec = 0, .tv_nsec = 0 } } ;
+ futimens(0, foo) ;
+ return 0 ;
+}
diff --git a/src/sysdeps/tryfutimes.c b/src/sysdeps/tryfutimes.c
new file mode 100644
index 0000000..a65ab5a
--- /dev/null
+++ b/src/sysdeps/tryfutimes.c
@@ -0,0 +1,11 @@
+/* ISC license. */
+
+#include <sys/types.h>
+#include <sys/time.h>
+
+int main (void)
+{
+ struct timeval foo[2] = { { .tv_sec = 0, .tv_usec = 0 }, { .tv_sec = 0, .tv_usec = 0 } } ;
+ futimes(0, foo) ;
+ return 0 ;
+}