tor 0.4.8.4: compilation error on NetBSD
I tried updating the pkgsrc package from the 0.4.7 branch to 0.4.8.4, but got an error:
--- src/ext/equix/hashx/src/libhashx_a-virtual_memory.o ---
src/ext/equix/hashx/src/virtual_memory.c: In function 'hashx_vm_alloc_huge':
src/ext/equix/hashx/src/virtual_memory.c:113:5: error: 'MAP_HUGETLB' undeclared (first use in this function)
113 | | MAP_HUGETLB | MAP_POPULATE, -1, 0);
| ^~~~~~~~~~~
src/ext/equix/hashx/src/virtual_memory.c:113:5: note: each undeclared identifier is reported only once for each function it appears in
src/ext/equix/hashx/src/virtual_memory.c:113:19: error: 'MAP_POPULATE' undeclared (first use in this function); did you mean 'MAP_PRIVATE'?
113 | | MAP_HUGETLB | MAP_POPULATE, -1, 0);
| ^~~~~~~~~~~~
| MAP_PRIVATE
These defines do not exist on NetBSD (and I suspect on other BSDs neither, e.g. FreeBSD doesn't mention it in https://man.freebsd.org/cgi/man.cgi?query=mmap&apropos=0&sektion=0&manpath=FreeBSD+13.2-RELEASE+and+Ports&arch=default&format=html). Please make the code conditional on these defines existing.