shutdown(3SOCKET) requires sys/socket.h diff -wpruN --no-dereference '--exclude=*.orig' a~/src/util/peekfd.c a/src/util/peekfd.c --- a~/src/util/peekfd.c 1970-01-01 00:00:00 +++ a/src/util/peekfd.c 1970-01-01 00:00:00 @@ -46,6 +46,9 @@ #include #endif #include +#ifdef __illumos__ +#include +#endif #ifndef SHUT_RDWR #define SHUT_RDWR 2