I am unable to use microcoap
library (https://github.com/1248/microcoap) in Arduino IDE. When I try to compile it produces following error
main-posix.c:1:24: fatal error: sys/socket.h: No such file or directory
#include <sys/socket.h>
^
This question has already been answered in (Cant use Micro-Coap library for arduino) but the answer doesn't make sense.
Delete that main-posix.c because this is necessary for linux, not Arduino. It will definitely work.