commit f354ce00173883441b33d4ddc5eb370a5074be45
parent a20b94aac67bc6b5f0a3290b317ce72c4016a5d7
Author: finwo <finwo@pm.me>
Date: Sun, 22 Oct 2023 22:27:38 +0200
Added EPOLL_HANDLE definition to wepoll library
Diffstat:
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/piscisaureus/wepoll/patch/00-mixed-win-lin.patch b/piscisaureus/wepoll/patch/00-mixed-win-lin.patch
@@ -1,5 +1,5 @@
diff --git a/wepoll.c b/wepoll.c
-index 186d3f2..7637958 100644
+index 186d3f2..628ab2a 100644
--- a/wepoll.c
+++ b/wepoll.c
@@ -33,6 +33,8 @@
@@ -11,14 +11,22 @@ index 186d3f2..7637958 100644
#include <stdint.h>
enum EPOLL_EVENTS {
-@@ -2251,3 +2253,5 @@ SOCKET ws_get_base_socket(SOCKET socket) {
+@@ -69,6 +71,7 @@ enum EPOLL_EVENTS {
+
+ typedef void* HANDLE;
+ typedef uintptr_t SOCKET;
++typedef HANDLE EPOLL_HANDLE;
+
+ typedef union epoll_data {
+ void* ptr;
+@@ -2251,3 +2254,5 @@ SOCKET ws_get_base_socket(SOCKET socket) {
return_set_error(INVALID_SOCKET, error);
}
}
+
+#endif // defined(_WIN32) || defined(_WIN64)
diff --git a/wepoll.h b/wepoll.h
-index daf6bdb..2930acd 100644
+index daf6bdb..2a0edb0 100644
--- a/wepoll.h
+++ b/wepoll.h
@@ -32,6 +32,8 @@
@@ -30,7 +38,15 @@ index daf6bdb..2930acd 100644
#ifndef WEPOLL_EXPORT
#define WEPOLL_EXPORT
#endif
-@@ -110,4 +112,10 @@ WEPOLL_EXPORT int epoll_wait(HANDLE ephnd,
+@@ -72,6 +74,7 @@ enum EPOLL_EVENTS {
+
+ typedef void* HANDLE;
+ typedef uintptr_t SOCKET;
++typedef HANDLE EPOLL_HANDLE;
+
+ typedef union epoll_data {
+ void* ptr;
+@@ -110,4 +113,12 @@ WEPOLL_EXPORT int epoll_wait(HANDLE ephnd,
} /* extern "C" */
#endif
@@ -38,6 +54,8 @@ index daf6bdb..2930acd 100644
+ //
+#include <sys/epoll.h>
+
++typedef void* EPOLL_HANDLE;
++
+#endif // defined(_WIN32) || defined(_WIN64)
+
#endif /* WEPOLL_H_ */