Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move netdb.h and ioctl.h into wolfio.c #7288

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions src/wolfio.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,54 @@
#include <wolfssl/error-ssl.h>
#include <wolfssl/wolfio.h>

#ifndef USE_WINDOWS_API
#if defined(WOLFSSL_LWIP) && !defined(WOLFSSL_APACHE_MYNEWT)
#elif defined(ARDUINO)
#elif defined(FREESCALE_MQX)
#elif defined(FREESCALE_KSDK_MQX)
#elif (defined(WOLFSSL_MDK_ARM) || defined(WOLFSSL_KEIL_TCP_NET))
#elif defined(WOLFSSL_CMSIS_RTOS)
#elif defined(WOLFSSL_CMSIS_RTOSv2)
#elif defined(WOLFSSL_TIRTOS)
#elif defined(FREERTOS_TCP)
#elif defined(WOLFSSL_IAR_ARM)
#elif defined(HAVE_NETX_BSD)
#elif defined(WOLFSSL_VXWORKS)
#elif defined(WOLFSSL_NUCLEUS_1_2)
#elif defined(WOLFSSL_LINUXKM)
/* the requisite linux/net.h is included in wc_port.h, with incompatible warnings masked out. */
#elif defined(WOLFSSL_ATMEL)
#elif defined(INTIME_RTOS)
#include <netdb.h>
#elif defined(WOLFSSL_PRCONNECT_PRO)
#include <netdb.h>
#include <sys/ioctl.h>
#elif defined(WOLFSSL_SGX)
#elif defined(WOLFSSL_APACHE_MYNEWT) && !defined(WOLFSSL_LWIP)
#elif defined(WOLFSSL_DEOS)
#elif defined(WOLFSSL_ZEPHYR)
#elif defined(MICROCHIP_PIC32)
#elif defined(HAVE_NETX)
#elif defined(FUSION_RTOS)
#elif !defined(WOLFSSL_NO_SOCK)
#if defined(HAVE_RTP_SYS)
#elif defined(EBSNET)
#elif defined(NETOS)
#elif !defined(DEVKITPRO) && !defined(WOLFSSL_PICOTCP) \
&& !defined(WOLFSSL_CONTIKI) && !defined(WOLFSSL_WICED) \
&& !defined(WOLFSSL_GNRC) && !defined(WOLFSSL_RIOT_OS)
#include <netdb.h>
#ifdef __PPU
#include <netex/errno.h>
#else
#include <sys/ioctl.h>
#endif
#endif
#endif

#endif /* USE_WINDOWS_API */


#if defined(HAVE_HTTP_CLIENT)
#include <stdlib.h> /* strtol() */
#endif
Expand Down
8 changes: 0 additions & 8 deletions wolfssl/wolfio.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <netdb.h>
#include <sys/ioctl.h>
#elif defined(WOLFSSL_SGX)
#include <errno.h>
#elif defined(WOLFSSL_APACHE_MYNEWT) && !defined(WOLFSSL_LWIP)
Expand Down Expand Up @@ -163,15 +161,9 @@
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#ifdef HAVE_NETDB_H
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WhyHAVE_NETDB_H and HAVE_SYS_IOCTL_H is removed? 😢

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #7381

#include <netdb.h>
#endif
#ifdef __PPU
#include <netex/errno.h>
#else
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
#endif
#endif
#endif
Expand Down
Loading