]> granicus.if.org Git - esp-idf/commitdiff
lwip: fix duplicate definition of O_NONBLOCK
authorIvan Grokhotkov <ivan@espressif.com>
Tue, 8 Nov 2016 01:05:05 +0000 (09:05 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Tue, 8 Nov 2016 12:17:08 +0000 (20:17 +0800)
LwIP will define O_NONBLOCK in sockets.h if it isn't defined yet.
If sys/fcntl.h is included after socket.h, there will be duplicate definition.
Work around by including sys/fcntl.h into lwipopts.h.

https://github.com/espressif/esp-idf/issues/75

components/lwip/include/lwip/port/lwipopts.h

index f7058875084c8d05420c4f48a4da62b6b9bf9b99..d06e75685091ea2e3627259b712089ad6e69c014 100755 (executable)
@@ -35,6 +35,7 @@
 #include <stdlib.h>
 #include <time.h>
 #include <sys/time.h>
+#include <sys/fcntl.h>
 #include "esp_task.h"
 #include "sdkconfig.h"