From: Benjamin Stürz Date: Sun, 9 Apr 2023 16:02:04 +0000 (+0200) Subject: Fix compilation on OpenBSD X-Git-Tag: 2.1.0-beta1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e24334f36971711753e886a5fe8f2f1c248a059d;p=thirdparty%2Fzlib-ng.git Fix compilation on OpenBSD Non-POSIX functions (like vasprintf() and swap16()) require _BSD_SOURCE to be defined. Signed-off-by: Benjamin Stürz --- diff --git a/zbuild.h b/zbuild.h index 922b2cae2..27f784a99 100644 --- a/zbuild.h +++ b/zbuild.h @@ -8,6 +8,9 @@ #ifndef _ISOC11_SOURCE # define _ISOC11_SOURCE 1 /* aligned_alloc */ #endif +#ifdef __OpenBSD__ +# define _BSD_SOURCE 1 +#endif #include #include