Skip to content

Commit

Permalink
Fix compilation on OpenBSD
Browse files Browse the repository at this point in the history
Non-POSIX functions (like vasprintf() and swap16()) require
_BSD_SOURCE to be defined.

Signed-off-by: Benjamin Stürz <benni@stuerz.xyz>
  • Loading branch information
riscygeek authored and Dead2 committed Apr 16, 2023
1 parent fcd7aa9 commit 0a4f8a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions zbuild.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#ifndef _ISOC11_SOURCE
# define _ISOC11_SOURCE 1 /* aligned_alloc */
#endif
#ifdef __OpenBSD__
# define _BSD_SOURCE 1
#endif

/* This has to be first include that defines any types */
#if defined(_MSC_VER)
Expand Down

0 comments on commit 0a4f8a7

Please sign in to comment.