Since nanocoap uses `arpa/inet.h` for the address family name defintions this needs to be in the include path. In RIOT this resides in `sys/posix/include`.