]> PatchyGit - patchyircd.git/commitdiff
netpoll: move include uv.h out of namespace
authorEgor <egor@patchysicp.xyz>
Wed, 28 May 2025 20:15:55 +0000 (23:15 +0300)
committerEgor <egor@patchysicp.xyz>
Wed, 28 May 2025 20:15:55 +0000 (23:15 +0300)
src/netpoll.cpp

index 017bcc1..06c3574 100644 (file)
@@ -1,5 +1,9 @@
 #include "netpoll.h"
 
+#ifdef HAS_UV
+#include <uv.h>
+#endif
+
 namespace netpoll {
 #define NETPOLL_MAXFDS 1024
 static struct net_pollfd fds[NETPOLL_MAXFDS] = {};
@@ -63,7 +67,6 @@ int get(struct net_pollfd *out)
        return ev;
 }
 #else
-#include <uv.h>
 #define container_of(ptr, type, member) ((type *)((char *)(ptr) - offsetof(type, member)))
 struct polldata {
        uv_poll_t uv;