Skip to content

Define _BSD_SOURCE in builtin.c for OpenBSD support #3278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/builtin.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# define _XPG6
# define __EXTENSIONS__
#endif
#ifdef __OpenBSD__
# define _BSD_SOURCE
#endif
#include <sys/time.h>
#include <stdlib.h>
#include <stddef.h>
Expand Down
5 changes: 5 additions & 0 deletions tests/optional.test
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ last(range(365 * 67)|("1970-03-01T01:02:03Z"|strptime("%Y-%m-%dT%H:%M:%SZ")|mkti
null
[2037,1,11,1,2,3,3,41]

# Regression test for #3276
fromdate
"2038-01-19T03:14:08Z"
2147483648

# %e is not available on mingw/WIN32
strftime("%A, %B %e, %Y")
1435677542.822351
Expand Down
Loading