Fix compilation on OpenBSD

Non-POSIX functions (like vasprintf() and swap16()) require
_BSD_SOURCE to be defined.

Signed-off-by: Benjamin Stürz <benni@stuerz.xyz>
This commit is contained in:
Benjamin Stürz 2023-04-09 18:02:04 +02:00 committed by Hans Kristian Rosbach
parent 58c76217ec
commit e24334f369

View File

@ -8,6 +8,9 @@
#ifndef _ISOC11_SOURCE
# define _ISOC11_SOURCE 1 /* aligned_alloc */
#endif
#ifdef __OpenBSD__
# define _BSD_SOURCE 1
#endif
#include <stddef.h>
#include <string.h>