The recv() system call and MSG_PEEKconstanct are declared in sys/socket.h
But your temp.config says:
checking sys/socket.h usability... no
checking sys/socket.h presence... no
checking for sys/socket.h... no
So the configure script thinks that sys/socket.h doesn't exist on your system:
There's something wrong with your system or with the configure script. Given
that sys/config.h is pretty basic, it's probably there, which makes your clang
compiler the most likely faulty component ... try configuring/building using
the standard compiler instead.