martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.23k stars 256 forks source link

build: add -D_NETBSD_SOURCE for NetBSD #891

Closed silasdb closed 3 years ago

silasdb commented 3 years ago

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.