mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-22 18:46:18 +00:00
37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Fabian Dellwing <fabian@dellwing.net>
|
|
Date: Tue, 16 Apr 2024 14:36:46 +0200
|
|
Subject: [PATCH] Fallback to bundled `strptime` implementation
|
|
|
|
---
|
|
src/util.c | 2 +-
|
|
src/util.h | 2 +-
|
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/util.c b/src/util.c
|
|
index de44fa62c6402dc3e1df88cef75c0c9dadd2ee26..5a246932dd5ae6fb4b393f6bdd257fc3762cf58e 100644
|
|
--- a/src/util.c
|
|
+++ b/src/util.c
|
|
@@ -451,7 +451,7 @@ jv jq_util_input_next_input(jq_util_input_state *state) {
|
|
return value;
|
|
}
|
|
|
|
-#if defined(WIN32) && !defined(HAVE_STRPTIME)
|
|
+#if defined(WIN32) || !defined(HAVE_STRPTIME)
|
|
/* http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/lib/libc/time/strptime.c?only_with_tag=HEAD
|
|
* NetBSD implementation strptime().
|
|
* Format description: https://netbsd.gw.com/cgi-bin/man-cgi?strptime+3+NetBSD-current
|
|
diff --git a/src/util.h b/src/util.h
|
|
index 562ac19a8bf4f602d9e8d42502e44dbc0e92d70f..f668330ee1e038a6ea524d110232e6a902274853 100644
|
|
--- a/src/util.h
|
|
+++ b/src/util.h
|
|
@@ -59,7 +59,7 @@ const void *_jq_memmem(const void *haystack, size_t haystacklen,
|
|
|
|
#include <time.h>
|
|
|
|
-#if defined(WIN32) && !defined(HAVE_STRPTIME)
|
|
+#if defined(WIN32) || !defined(HAVE_STRPTIME)
|
|
char* strptime(const char *buf, const char *fmt, struct tm *tm);
|
|
#endif
|
|
|