Self correction: I meant UTC time and *not* local time of course.
Best regards,
Mike
Hi Shubham,
mktime() converts a struct tm interpreted as local time to time_t, while timegm() converts a struct tm interpreted as UTC to time_t. The result is different.
Otherwise, I'd gladly merge your patch is you declare it public domain. Would you update the patch to convert to local time?
Best regards,
MikeOn 2/26/26 10:35 AM, shubham gupta via stunnel-users wrote:
Hi,
Sorry for the wrong patch. I have attached the corrected one in this email.
Thanks,
Shubham
---------- Forwarded message ---------
From: shubham gupta <shubham17031994@gmail.com>
Date: Thu, Feb 26, 2026 at 2:55 PM
Subject: timegm not supported in AIX
To: <stunnel-users@stunnel.org>
Hi,
I am building the latest stunnel on an AIX machine. However I see build failure due to missing API timegm.
Snippet from the error generating file src/oscp.c
#ifdef _WIN32
return _mkgmtime(&tm);
#else /* defined _WIN32 */
return timegm(&tm);
#endif /* defined _WIN32 */
Error log:
libtool: link: /opt/freeware/bin/gcc -maix64 -O2 -DOPENSSL_NO_PSK -g -O2 -Wall -Wextra -Wpedantic -Wformat=2 -Wconversion -Wno-deprecated-declarations -Wno-unused-command-line-argument -fPIE -D_FORTIFY_SOURCE=2 -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -fPIE -pie -o stunnel stunnel-tls.o stunnel-str.o stunnel-file.o stunnel-client.o stunnel-log.o stunnel-options.o stunnel-protocol.o stunnel-network.o stunnel-resolver.o stunnel-ssl.o stunnel-ctx.o stunnel-verify.o stunnel-sthreads.o stunnel-ocsp.o stunnel-fd.o stunnel-dhparam.o stunnel-cron.o stunnel-stunnel.o stunnel-pty.o stunnel-libwrap.o stunnel-ui_unix.o -L/usr/lib -lssl -lcrypto -L/opt/freeware/lib64 -L/opt/freeware/lib -lpthread
ld: 0711-317 ERROR: Undefined symbol: .timegm
Please consider the patch attached along with the email for fixing the issue.
Thanks,
Shubham
![]()
Email tracked with Mailsuite · Opt out
26/02/26, 14:51:51
_______________________________________________ stunnel-users mailing list -- stunnel-users@stunnel.org To unsubscribe send an email to stunnel-users-leave@stunnel.org
_______________________________________________ stunnel-users mailing list -- stunnel-users@stunnel.org To unsubscribe send an email to stunnel-users-leave@stunnel.org