Skip to content

Commit 3563f8c

Browse files
authored
Merge pull request #1079 from dressupgeekout/charlotte_dragonfly
Some basic fixes for DragonFly
2 parents 01aab66 + 575af76 commit 3563f8c

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/core/features.h

+5
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,9 @@
6161
#define _NETBSD_SOURCE
6262
#endif
6363

64+
/* Needed for several things when building with -std=c99. */
65+
#if !__BSD_VISIBLE && defined(__DragonFly__)
66+
#define __BSD_VISIBLE 1
67+
#endif
68+
6469
#endif

src/core/os.c

+4
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ JANET_CORE_FN(os_which,
126126
"* :freebsd\n\n"
127127
"* :openbsd\n\n"
128128
"* :netbsd\n\n"
129+
"* :dragonfly\n\n"
130+
"* :bsd\n\n"
129131
"* :posix - A POSIX compatible system (default)\n\n"
130132
"May also return a custom keyword specified at build time.") {
131133
janet_fixarity(argc, 0);
@@ -150,6 +152,8 @@ JANET_CORE_FN(os_which,
150152
return janet_ckeywordv("netbsd");
151153
#elif defined(__OpenBSD__)
152154
return janet_ckeywordv("openbsd");
155+
#elif defined(__DragonFly__)
156+
return janet_ckeywordv("dragonfly");
153157
#elif defined(JANET_BSD)
154158
return janet_ckeywordv("bsd");
155159
#else

0 commit comments

Comments
 (0)