FreeBSD Bugzilla – Attachment 249371 Details for
Bug 277863
Possible regression in mktime(3)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Code that triggers the mktime bug
mktime_bug.c (text/plain), 508 bytes, created by
Nico Sonack
on 2024-03-21 13:32:32 UTC
(
hide
)
Description:
Code that triggers the mktime bug
Filename:
MIME Type:
Creator:
Nico Sonack
Created:
2024-03-21 13:32:32 UTC
Size:
508 bytes
patch
obsolete
>#include <assert.h> >#include <err.h> >#include <errno.h> >#include <stdio.h> >#include <stdlib.h> >#include <sysexits.h> >#include <time.h> > >int >main(void) >{ > struct tm time_buf = { > .tm_sec = 0, > .tm_min = 0, > .tm_hour = 0, > .tm_mday = 1, > .tm_mon = 0, > .tm_year = 69, > .tm_wday = 3, > .tm_yday = 0, > .tm_isdst = 0, > .tm_zone = "CET", > }; > > errno = 0; > time_t const unix_time = mktime(&time_buf); > if (errno) > err(EX_DATAERR, "mktime failed"); > > printf("Unix time is: %ld\n", unix_time); > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 277863
: 249371