diff --git a/source/posix/time.c b/source/posix/time.c index dd49d6b0b..c5aff559a 100644 --- a/source/posix/time.c +++ b/source/posix/time.c @@ -2,6 +2,9 @@ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ + +// For timegm() on glibc/musl +#define _DEFAULT_SOURCE #include #if defined(__ANDROID__) && !defined(__LP64__) @@ -59,11 +62,6 @@ time_t aws_timegm(struct tm *const t) { #else -# ifndef __APPLE__ -/* glibc.... you disappoint me.. */ -extern time_t timegm(struct tm *); -# endif - time_t aws_timegm(struct tm *const t) { return timegm(t); }