diff options
Diffstat (limited to 'utimensat.patch')
-rw-r--r-- | utimensat.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/utimensat.patch b/utimensat.patch new file mode 100644 index 000000000000..5c101bd40126 --- /dev/null +++ b/utimensat.patch @@ -0,0 +1,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; |