milestone1

This commit is contained in:
2026-05-07 04:35:57 +01:00
parent b9698beceb
commit be17bbc9bc
37 changed files with 973 additions and 317 deletions
+17 -28
View File
@@ -1,4 +1,4 @@
--- a/src/meson.build
--- a/src/meson.build.orig
+++ b/src/meson.build
@@ -81,8 +81,7 @@
endif
@@ -10,33 +10,9 @@
else
wayland_scanner_for_build = wayland_scanner
endif
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
@@ -39,7 +39,23 @@
#include <dlfcn.h>
#include <sys/time.h>
#include <fcntl.h>
-#include <sys/eventfd.h>
+#ifndef EFD_CLOEXEC
+#define EFD_CLOEXEC O_CLOEXEC
+#endif
+#ifndef EFD_NONBLOCK
+#define EFD_NONBLOCK O_NONBLOCK
+#endif
+#ifndef EFD_SEMAPHORE
+#define EFD_SEMAPHORE 0x1
+#endif
+static int eventfd(unsigned int initval, int flags) {
+ int oflag = O_RDWR;
+ if (flags & EFD_CLOEXEC) oflag |= O_CLOEXEC;
+ if (flags & EFD_NONBLOCK) oflag |= O_NONBLOCK;
+ char path[64];
+ snprintf(path, sizeof(path), "/scheme/event/eventfd/%u/%d", initval, (flags & EFD_SEMAPHORE) ? 1 : 0);
+ return open(path, oflag);
+}
#include <sys/file.h>
#include <sys/stat.h>
--- a/src/wayland-client.c.orig
+++ b/src/wayland-client.c
@@ -649,6 +649,11 @@
wl_proxy_add_listener(struct wl_proxy *proxy,
void (**implementation)(void), void *data)
@@ -65,3 +41,16 @@
return proxy->display;
}
--- a/src/connection.c.orig
+++ b/src/connection.c
@@ -37,6 +37,9 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
+#ifndef MSG_NOSIGNAL
+#define MSG_NOSIGNAL 0
+#endif
#include <time.h>
#include <ffi.h>