Skip to content

Commit

Permalink
Silence warning about missing include in macOS builds (#2741)
Browse files Browse the repository at this point in the history
  • Loading branch information
gwynne authored Jun 13, 2024
1 parent 72cab7d commit e5a216b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Sources/CNIOLinux/include/CNIOLinux.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,19 @@
#include <pthread.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
#include "liburing_nio.h"
#include <linux/vm_sockets.h>
#include <fcntl.h>
#include <fts.h>
#include <stdio.h>
#include <dirent.h>
#endif

// We need to include this outside the `#ifdef` so macOS builds don't warn about the missing include,
// but we also need to make sure the system includes come before it on Linux, so we put it down here
// between an `#endif/#ifdef` pair rather than at the top.
#include "liburing_nio.h"

#ifdef __linux__

#if __has_include(<linux/mptcp.h>)
#include <linux/mptcp.h>
Expand Down

0 comments on commit e5a216b

Please sign in to comment.