Build failure on OS X 10.10 and earlier: use of undeclared identifier 'MAP_ANONYMOUS'
@ryandesign
Submitted by Ryan Schmidt Link to original bug (#792074)
Description
gtk-vnc 0.7.1 fails to build on OS X Yosemite 10.10 and earlier with:
coroutine_ucontext.c:66:39: error: use of undeclared identifier 'MAP_ANONYMOUS' MAP_PRIVATE | MAP_ANONYMOUS, ^ 1 error generated.
Here is a full build log:
It builds fine on OS X El Capitan 10.11 and later.
MAP_ANONYMOUS is the same thing as MAP_ANON, which is defined on earlier systems (back to Mac OS X Tiger 10.4 at least), so you could just always use MAP_ANON, or you could...
#define MAP_ANONYMOUS MAP_ANON
...which is what the system headers do on newer versions of macOS.
Version: 0.7.x