In file included from ../lash/list.h:37,
../lash/xmalloc.h: In function 'lash_strdup':
../lash/xmalloc.h:51: warning: incompatible implicit declaration of built-in function 'strdup'
socket.c: In function 'lash_lookup_peer_name':
socket.c:266: error: 'NI_MAXHOST' undeclared (first use in this function)
socket.c:266: error: (Each undeclared identifier is reported only once
socket.c:266: error: for each function it appears in.)
socket.c: In function 'lash_lookup_peer_port':
socket.c:279: error: 'NI_MAXSERV' undeclared (first use in this function)
This seems to be a little bit odd : in lash/xmalloc.h, _GNU_SOURCE is defined by :
#endif /* LASH_BUILD */
Do everything should be fine : socket.c includes lash/list.h which includes lash/xmalloc.h. But it fails ...
Created attachment 158509 [details, diff]
I just copy/past code from lash/xmalloc.h in socket.c and it works.
it should just define _GNU_SOURCE over all the sources I think...
well... I don't like the current situation, so I applied your patch anyway. Thanks!