From f976c98d334dce9ba30aa7da4427bb530aeea536 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 6 May 2024 16:04:05 -0400 Subject: xtime: Use the libc's timegm() if present --- build/has/timegm.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 build/has/timegm.c (limited to 'build/has/timegm.c') diff --git a/build/has/timegm.c b/build/has/timegm.c new file mode 100644 index 0000000..6e2d155 --- /dev/null +++ b/build/has/timegm.c @@ -0,0 +1,9 @@ +// Copyright © Tavian Barnes +// SPDX-License-Identifier: 0BSD + +#include + +int main(void) { + struct tm tm = {0}; + return (int)timegm(&tm); +} -- cgit v1.2.3