Skip to content

Commit 522c413

Browse files
fstddef-
authored andcommitted
support NetBSD
1 parent d276f2c commit 522c413

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/base/detect.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@
3232
#define CONF_PLATFORM_STRING "freebsd"
3333
#endif
3434

35+
#if defined(__NetBSD__)
36+
#define CONF_FAMILY_UNIX 1
37+
#define CONF_FAMILY_STRING "unix"
38+
#define CONF_PLATFORM_NETBSD 1
39+
#define CONF_PLATFORM_STRING "netbsd"
40+
#endif
41+
3542
#if defined(__OpenBSD__)
3643
#define CONF_FAMILY_UNIX 1
3744
#define CONF_FAMILY_STRING "unix"
@@ -82,7 +89,7 @@
8289

8390
/* use gcc endianness definitions when available */
8491
#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__MINGW32__) && !defined(__sun)
85-
#if defined(__FreeBSD__) || defined(__OpenBSD__)
92+
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
8693
#include <sys/endian.h>
8794
#else
8895
#include <endian.h>

0 commit comments

Comments
 (0)