I added the source you provided and got the following errors after running gmake.
gcc -O2 -DNDEBUG -Wall -fPIC -pipe -I../include -I"/usr/local/ns/include" -DHAVE_CONFIG_H -c -o binder.o binder.c
binder.c: In function 'Ns_SockBinderListen':
binder.c:808:8: error: 'struct msghdr' has no member named 'msg_accrights'
binder.c:809:8: error: 'struct msghdr' has no member named 'msg_accrightslen'
binder.c: In function 'Binder':
binder.c:1056:16: error: 'struct msghdr' has no member named 'msg_accrights'
binder.c:1057:16: error: 'struct msghdr' has no member named 'msg_accrightslen'
gmake[1]: *** [binder.o] Error 1
gmake[1]: Leaving directory `/usr/local/src/naviserver-4.99.5/nsd'
gmake: *** [all] Error 1
Thanks for your response, I will of course also check out the link you provided.