CBL-Mariner/SPECS/busybox/busybox-1.31.1-stime-fix.patch

25 lines
862 B
Diff
Raw Normal View History

diff -up busybox-1.31.1/libbb/Kbuild.src.stime busybox-1.31.1/libbb/Kbuild.src
--- busybox-1.31.1/libbb/Kbuild.src.stime 2019-11-13 17:08:22.808371597 -0500
+++ busybox-1.31.1/libbb/Kbuild.src 2019-11-13 17:08:50.154882529 -0500
@@ -198,3 +198,6 @@ lib-$(CONFIG_FEATURE_FIND_REGEX) += xreg
# Add the experimental logging functionality, only used by zcip
lib-$(CONFIG_ZCIP) += logenv.o
+
+lib-$(CONFIG_DATE) += stime.o
+lib-$(CONFIG_RDATE) += stime.o
diff -up busybox-1.31.1/libbb/stime.c.stime busybox-1.31.1/libbb/stime.c
--- busybox-1.31.1/libbb/stime.c.stime 2019-11-13 17:07:06.905723262 -0500
+++ busybox-1.31.1/libbb/stime.c 2019-11-13 17:07:51.769924328 -0500
@@ -0,0 +1,10 @@
+#include <time.h>
+#include <sys/time.h>
+
+int stime(const time_t *t) {
+ struct timeval tv;
+
+ tv.tv_sec = *t;
+ tv.tv_usec = 0;
+ return settimeofday(&tv, NULL);
+}