Libc.h just contains small list of includes. To compile nanomsg sample its enough to (src):
Replacing:
#include <libc.h>
with
#include <unistd.h>
#include <string.h>
#include <pthread.h>
I used this cmd for static compilation:
gcc -pthread bus.c ../nanomsg/.libs/libnanomsg.a -o test -lanl
Note -pthread and -lanl at the end of line.