From 1cf2e7a8ea6052e78214cc55f0b22ce8e5473bcc Mon Sep 17 00:00:00 2001 From: barracuda156 Date: Mon, 14 Aug 2023 15:40:53 +0800 Subject: [PATCH 1/2] Network.h: include forgotten pthread.h for MacOS too --- src/Mayaqua/Network.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Mayaqua/Network.h b/src/Mayaqua/Network.h index 202df410..861993c2 100644 --- a/src/Mayaqua/Network.h +++ b/src/Mayaqua/Network.h @@ -23,6 +23,10 @@ #ifdef UNIX_OPENBSD #include #endif + +#ifdef UNIX_MACOS +#include +#endif #endif From a80d3f20321a9de15cd3c6a9baa1a39782c4b528 Mon Sep 17 00:00:00 2001 From: barracuda156 Date: Mon, 14 Aug 2023 15:54:56 +0800 Subject: [PATCH 2/2] TunTap.h: fix for undefined u_char, u_short on MacOS --- src/Mayaqua/TunTap.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Mayaqua/TunTap.h b/src/Mayaqua/TunTap.h index 12f076c0..792ba0dd 100644 --- a/src/Mayaqua/TunTap.h +++ b/src/Mayaqua/TunTap.h @@ -162,6 +162,13 @@ struct tundladdr { #ifndef _NET_IF_TUN_H_ #define _NET_IF_TUN_H_ +#ifdef UNIX_MACOS +#ifndef _DARWIN_C_SOURCE +#define _DARWIN_C_SOURCE +#endif +#include +#endif + /* Refer to if_tunvar.h for the softc stuff */ /* Maximum transmit packet size (default) */