libcoap
libcoap copied to clipboard
sys/socket.h and netinet/in.h should not be included for any embedded target
Currently, inclusion of these headers is guarded for CONTIKI in libcoap.h
#include <netinet/in.h>
#include <sys/socket.h>
#endif /* CONTIKI */</code>
However, other systems, e.g. FreeRTOS + lwIP would run into the same limitations. These headers are not needed in the lwIP port.
Proposal would be to have a general macro which skips inclusion of these, which can be automatically defined in case CONTIKI is defined.
libcoap LwIP support has been re-written in PR https://github.com/obgm/libcoap/pull/884, and so this should no longer be an issue. The required header files are now in build type specific files.
Closed as fixed in #926 which is now in the develop branch.