OpenBSD needs _BSD_SOURCE, not _GNU_SOURCE, for vasprintf

This commit is contained in:
Sven M. Hallberg 2019-11-20 17:47:26 +01:00
parent 7ee0e78525
commit 9cac052b45

View file

@ -1,4 +1,8 @@
#ifdef __OpenBSD__
#define _BSD_SOURCE // to obtain asprintf/vasprintf
#else
#define _GNU_SOURCE // to obtain asprintf/vasprintf
#endif
#include "platform.h"
#include <stdio.h>