summaryrefslogtreecommitdiff
path: root/src/fdevent.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2023-01-23 16:46:19 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2023-01-24 13:00:25 -0500
commit0787b10317ca2d6ba407b3f45e9d12828a77ef84 (patch)
treea6c023d1dbaaba864544c352ec727a1da994ff6a /src/fdevent.c
parent7ec82a55d9c898e7483af8e52145a16b5f3d72dc (diff)
downloadlighttpd-git-0787b10317ca2d6ba407b3f45e9d12828a77ef84.tar.gz
[core] iOS does not provide netinet/tcp_fsm.h
x-ref: https://redmine.lighttpd.net/boards/3/topics/10842
Diffstat (limited to 'src/fdevent.c')
-rw-r--r--src/fdevent.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/fdevent.c b/src/fdevent.c
index 2a0ef792..914fb6c1 100644
--- a/src/fdevent.c
+++ b/src/fdevent.c
@@ -545,11 +545,18 @@ int fdevent_connect_status(int fd) {
#include <netinet/tcp.h>
-#if (defined(__APPLE__) && defined(__MACH__)) \
- || defined(__FreeBSD__) || defined(__NetBSD__) \
+#if defined(__FreeBSD__) || defined(__NetBSD__) \
|| defined(__OpenBSD__) || defined(__DragonFly__)
#include <netinet/tcp_fsm.h>
#endif
+#if defined(__APPLE__) && defined(__MACH__)
+#include <TargetConditionals.h> /* TARGET_OS_IPHONE, TARGET_OS_MAC */
+#if TARGET_OS_IPHONE /* iOS, tvOS, or watchOS device */
+/*#define TCPS_CLOSE_WAIT 5*/ /* ??? which header contains this, if any ??? */
+#elif TARGET_OS_MAC /* MacOS */
+#include <netinet/tcp_fsm.h>
+#endif
+#endif
/* fd must be TCP socket (AF_INET, AF_INET6), end-of-stream recv() 0 bytes */
int fdevent_is_tcp_half_closed(int fd) {