diff options
| author | Silas <silas_git@nocafe.net> | 2020-11-12 08:36:33 -0300 |
|---|---|---|
| committer | Silas <silas_git@nocafe.net> | 2020-11-12 08:36:33 -0300 |
| commit | 01eef9f87b72b0c1473672ca17592077b5af1126 (patch) | |
| tree | 8fbe90c6cba2643304132c376ff233056f5a5137 /configure | |
| parent | b082d42355d42a6f1ca10659e86132ef7cf6239e (diff) | |
| download | vis-01eef9f87b72b0c1473672ca17592077b5af1126.tar.gz vis-01eef9f87b72b0c1473672ca17592077b5af1126.tar.xz | |
build: add -D_NETBSD_SOURCE for NetBSD
memrchr() signature is not exposed by default for NetBSD. If one does
not add -D_NETBSD_SOURCE, the compiler uses its own signature for
memrchr() that returns a 32-bit integer, leading to misbehaviour in some
situations. Defining _BSD_SOURCE doesn't work, so we define
_NETBSD_SOURCE.
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -227,6 +227,7 @@ OS=$(uname) case "$OS" in FreeBSD|DragonFly) CFLAGS_STD="$CFLAGS_STD -D_BSD_SOURCE -D__BSD_VISIBLE=1" ;; +NetBSD) CFLAGS_STD="$CFLAGS_STD -D_NETBSD_SOURCE" ;; *BSD) CFLAGS_STD="$CFLAGS_STD -D_BSD_SOURCE" ;; Darwin) CFLAGS_STD="$CFLAGS_STD -D_DARWIN_C_SOURCE" ;; AIX) CFLAGS_STD="$CFLAGS_STD -D_ALL_SOURCE" ;; |
