1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
diff --git a/ksh93/src/lib/libast/meson.build b/ksh93/src/lib/libast/meson.build
--- a/ksh93/src/lib/libast/meson.build
+++ b/ksh93/src/lib/libast/meson.build
@@ -168,12 +168,6 @@ if not cc.has_function('isnanl', prefix: '#include <math.h>')
libast_c_args += [ '-Disnanl=isnan' ]
endif
-if cc.has_function('utimensat', prefix: '#include <sys/time.h>')
- libast_c_args += [ '-D_lib_utimensat' ]
-elif cc.has_function('utimets', prefix: '#include <sys/time.h>')
- libast_c_args += [ '-D_lib_utimets' ]
-endif
-
if cc.has_function('sysinfo', prefix : '#include <sys/sysinfo.h>')
libast_c_args += [ '-D_lib_sysinfo=1' ]
endif
diff --git a/ksh93/src/lib/libast/tm/tvtouch.c b/ksh93/src/lib/libast/tm/tvtouch.c
--- a/ksh93/src/lib/libast/tm/tvtouch.c
+++ b/ksh93/src/lib/libast/tm/tvtouch.c
@@ -85,8 +85,6 @@ tvtouch(const char* path, const Tv_t* av, const Tv_t* mv, const Tv_t* cv, int fl
struct timeval am[2];
oerrno = errno;
-
-#if _lib_utimensat
if (!av)
{
ts[0].tv_sec = 0;
@@ -151,7 +149,7 @@ tvtouch(const char* path, const Tv_t* av, const Tv_t* mv, const Tv_t* cv, int fl
if (!mv)
mv = (const Tv_t*)&now;
}
-#elif _lib_utimets
+#if _lib_utimets
if (av == TV_TOUCH_RETAIN)
{
ts[0].tv_sec = st.st_atime;
|