termux-packages/packages/libelf/debuginfod-client.c.patch

24 lines
837 B
Diff
Raw Normal View History

--- elfutils-0.185/debuginfod/debuginfod-client.c 2021-05-22 23:55:24.000000000 +0530
+++ elfutils-0.185-patch/debuginfod/debuginfod-client.c 2021-08-28 22:14:21.559999738 +0530
@@ -85,6 +85,20 @@
#include <sys/utsname.h>
#include <curl/curl.h>
+static int futimes(int fd, const struct timeval tv[2]) {
+ if (tv == NULL)
+ return syscall(__NR_utimensat, fd, NULL, NULL, 0);
+ if (tv[0].tv_usec < 0 || tv[0].tv_usec >= 1000000 || tv[1].tv_usec < 0 ||
+ tv[1].tv_usec >= 1000000) {
+ return -1;
+ }
+ // Convert timeval to timespec.
+ struct timespec ts[2];
+ TIMEVAL_TO_TIMESPEC(tv, ts);
+
+ return syscall(__NR_utimensat, fd, NULL, ts, 0);
+}
+
/* If fts.h is included before config.h, its indirect inclusions may not
give us the right LFS aliases of these functions, so map them manually. */
#ifdef BAD_FTS