diff --git a/src/core/util.h b/src/core/util.h index a77c95fe..1ab5d4e7 100644 --- a/src/core/util.h +++ b/src/core/util.h @@ -31,10 +31,14 @@ #endif /* For internal usage */ -#ifndef _POSIX_C_SOURCE +#if !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 200112L #endif +#if !defined(_BSD_SOURCE) && defined(JANET_BSD) +#define _BSD_SOURCE 1 +#endif + /* Handle runtime errors */ #ifndef janet_exit #include diff --git a/src/include/janet.h b/src/include/janet.h index 59cefebf..664b803f 100644 --- a/src/include/janet.h +++ b/src/include/janet.h @@ -49,7 +49,6 @@ extern "C" { #if defined(__FreeBSD__) || defined(__DragonFly__) || \ defined(__NetBSD__) || defined(__OpenBSD__) #define JANET_BSD 1 -#define _BSD_SOURCE 1 #endif /* Check for Mac */