File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -286,14 +286,18 @@ typedef uint32_t socklen_t;
286286
287287/* Pull in the system socket types when available, but only declare
288288 * WOLFIP_HAVE_POSIX_TYPES once BOTH <sys/socket.h> AND <sys/uio.h> are
289- * confirmed present — wolfIP needs iovec/msghdr (from <sys/uio.h>) just
290- * as much as the socket types. If <sys/uio .h> is missing we fall through
291- * to the local iovec/msghdr definitions below so the build still works .
289+ * confirmed present. Zephyr is a special case: its POSIX socket layer
290+ * provides iovec/msghdr via macros from <sys/socket .h>, even though it
291+ * does not ship <sys/uio.h> .
292292 */
293+ #ifdef __ZEPHYR__
294+ #define WOLFIP_HAVE_POSIX_TYPES 1
295+ #endif
296+
293297#if defined(__has_include )
294298#if __has_include (< sys /socket .h > )
295299#include <sys/socket.h>
296- #if __has_include (< sys /uio .h > )
300+ #if !defined( WOLFIP_HAVE_POSIX_TYPES ) && __has_include (< sys /uio .h > )
297301#include <sys/uio.h>
298302#define WOLFIP_HAVE_POSIX_TYPES 1
299303#endif
You can’t perform that action at this time.
0 commit comments