Make socket functions depend on LWIP_SOCKETS

* Socket functions definitions moved out of the
  #define LWIP_SOCKET_EXTERNAL_HEADERS as all users who
  set LWIP_SOCKETS to 1 will need them regardless they use
  lwip's or external socket headers.
This commit is contained in:
Joan Lledó 2019-08-03 12:11:07 +02:00 committed by Simon Goldschmidt
parent 0aad45593f
commit 7fd158a109

View File

@ -41,12 +41,12 @@
#include "lwip/opt.h"
#if LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */
#if LWIP_SOCKET_EXTERNAL_HEADERS
#include LWIP_SOCKET_EXTERNAL_HEADER_SOCKETS_H
#else /* LWIP_SOCKET_EXTERNAL_HEADERS */
#if LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */
#include "lwip/ip_addr.h"
#include "lwip/netif.h"
#include "lwip/err.h"
@ -534,6 +534,16 @@ struct timeval {
};
#endif /* LWIP_TIMEVAL_PRIVATE */
#ifdef __cplusplus
}
#endif
#endif /* LWIP_SOCKET_EXTERNAL_HEADERS */
#ifdef __cplusplus
extern "C" {
#endif
#define lwip_socket_init() /* Compatibility define, no init needed. */
void lwip_socket_thread_init(void); /* LWIP_NETCONN_SEM_PER_THREAD==1: initialize thread-local semaphore */
void lwip_socket_thread_cleanup(void); /* LWIP_NETCONN_SEM_PER_THREAD==1: destroy thread-local semaphore */
@ -694,6 +704,4 @@ int lwip_inet_pton(int af, const char *src, void *dst);
#endif /* LWIP_SOCKET */
#endif /* LWIP_SOCKET_EXTERNAL_HEADERS */
#endif /* LWIP_HDR_SOCKETS_H */