libcoap icon indicating copy to clipboard operation
libcoap copied to clipboard

sys/socket.h and netinet/in.h should not be included for any embedded target

Open christian-herber opened this issue 4 years ago • 1 comments

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.

christian-herber avatar Jul 13 '20 15:07 christian-herber

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.

mrdeep1 avatar Jul 23 '22 15:07 mrdeep1

Closed as fixed in #926 which is now in the develop branch.

mrdeep1 avatar Sep 22 '22 09:09 mrdeep1