Skip to content

Commit

Permalink
Provide strptime implementation on all systems
Browse files Browse the repository at this point in the history
  • Loading branch information
george-hopkins authored and nicowilliams committed Jan 16, 2024
1 parent f51e841 commit f954e82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/builtin.c
Original file line number Diff line number Diff line change
Expand Up @@ -1464,7 +1464,7 @@ static jv f_strptime(jq_state *jq, jv a, jv b) {
*/
set_tm_wday(&tm);
set_tm_yday(&tm);
#elif defined(WIN32)
#elif defined(WIN32) || !defined(HAVE_STRPTIME)
set_tm_wday(&tm);
#else
if (tm.tm_wday == 8 && tm.tm_mday != 0 && tm.tm_mon >= 0 && tm.tm_mon <= 11)
Expand Down
2 changes: 1 addition & 1 deletion src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ jv jq_util_input_next_input(jq_util_input_state *state) {
return value;
}

#if defined(WIN32) && !defined(HAVE_STRPTIME)
#ifndef 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
Expand Down

0 comments on commit f954e82

Please sign in to comment.