Change feature flags for BSD.
#ifndef JANET_FEATURES_H_defined
#define JANET_FEATURES_H_defined
+#if defined(__NetBSD__) || defined(__APPLE__) || defined(__OpenBSD__) \
+ || defined(__bsdi__) || defined(__DragonFly__)
+/* Use BSD soucre on any BSD systems, include OSX */
+# define _BSD_SOURCE
+#else
+/* Use POSIX feature flags */
# ifndef _POSIX_C_SOURCE
# define _POSIX_C_SOURCE 200809L
# endif
+#endif
#if defined(WIN32) || defined(_WIN32)
#define WIN32_LEAN_AND_MEAN
