diff options
author | Ariadne Conill <ariadne@dereferenced.org> | 2021-12-09 10:34:28 -0600 |
---|---|---|
committer | Ariadne Conill <ariadne@dereferenced.org> | 2021-12-09 10:34:31 -0600 |
commit | 4846c498c7cec6c7de4c5edbd44552e49b926fbb (patch) | |
tree | d92633c6f95d2b7ec339661e4e96d62308538c8f /libfetch/http.c | |
parent | 8c6c44d3ebc6ad6f78ab939e8de433c6b567ada3 (diff) | |
download | apk-tools-4846c498c7cec6c7de4c5edbd44552e49b926fbb.tar.gz apk-tools-4846c498c7cec6c7de4c5edbd44552e49b926fbb.tar.bz2 apk-tools-4846c498c7cec6c7de4c5edbd44552e49b926fbb.tar.xz apk-tools-4846c498c7cec6c7de4c5edbd44552e49b926fbb.zip |
libfetch: avoid use of strdupa GNU extension
ref #10794
Diffstat (limited to 'libfetch/http.c')
-rw-r--r-- | libfetch/http.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libfetch/http.c b/libfetch/http.c index abc3ae6..51f1316 100644 --- a/libfetch/http.c +++ b/libfetch/http.c @@ -480,11 +480,12 @@ http_parse_mtime(const char *p, time_t *mtime) char *locale, *r; struct tm tm; - locale = strdupa(setlocale(LC_TIME, NULL)); + locale = strdup(setlocale(LC_TIME, NULL)); setlocale(LC_TIME, "C"); r = strptime(p, "%a, %d %b %Y %H:%M:%S GMT", &tm); /* XXX should add support for date-2 and date-3 */ setlocale(LC_TIME, locale); + free(locale); if (r == NULL) return (-1); *mtime = timegm(&tm); |