fix: restore clean libwayland source from archive + force kded6 rebuild

- Restored wayland-libwayland-v1.24.0-patched.tar.gz from sources/
  to replace corrupted source with stray + characters from failed patch
- Force-rebuilt kf6-kded6 (deleted pkgar) so #ifdef Q_OS_REDOX guard
  is compiled in — kded6 now uses offscreen QPA on Redox
This commit is contained in:
2026-05-06 15:46:23 +01:00
parent 61dbb9373a
commit 7754990727
6 changed files with 73 additions and 23 deletions
@@ -80,8 +80,8 @@ if get_option('libraries')
ffi_dep = dependency('libffi')
decls = [
{ 'header': 'sys/signalfd.h', 'symbol': 'SFD_CLOEXEC' },
{ 'header': 'sys/timerfd.h', 'symbol': 'TFD_CLOEXEC' },
{ 'header': 'signal.h', 'symbol': 'SIG_BLOCK' },
{ 'header': 'time.h', 'symbol': 'CLOCK_MONOTONIC' },
{ 'header': 'time.h', 'symbol': 'CLOCK_MONOTONIC' },
]
@@ -40,6 +40,15 @@
#include <time.h>
#include <ffi.h>
#ifndef MSG_NOSIGNAL
#define MSG_NOSIGNAL 0
#endif
#include <stdio.h>
#include <stdlib.h>
static FILE *open_memstream(char **bufp, size_t *sizep) {
*bufp = NULL; *sizep = 0; return NULL;
}
#include "wayland-util.h"
#include "wayland-private.h"
#include "wayland-os.h"
@@ -35,9 +35,56 @@
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/epoll.h>
#include <sys/signalfd.h>
#include <sys/timerfd.h>
/* #include <sys/signalfd.h> */
/* #include <sys/timerfd.h> */
#include <unistd.h>
#ifndef SFD_CLOEXEC
#define SFD_CLOEXEC O_CLOEXEC
#endif
#ifndef SFD_NONBLOCK
#define SFD_NONBLOCK O_NONBLOCK
#endif
#ifndef TFD_CLOEXEC
#define TFD_CLOEXEC O_CLOEXEC
#endif
#ifndef TFD_NONBLOCK
#define TFD_NONBLOCK O_NONBLOCK
#endif
#ifndef TFD_TIMER_ABSTIME
#define TFD_TIMER_ABSTIME 0x1
#endif
struct signalfd_siginfo { uint8_t pad[128]; };
static int signalfd_impl(int fd, const sigset_t *mask, uintptr_t masksize, int flags) {
int oflag = O_RDWR;
if (flags & SFD_CLOEXEC) oflag |= O_CLOEXEC;
if (flags & SFD_NONBLOCK) oflag |= O_NONBLOCK;
if (fd == -1) { fd = open("/scheme/event", oflag); if (fd < 0) return -1; }
else { if (flags & SFD_CLOEXEC) fcntl(fd, F_SETFD, FD_CLOEXEC); }
sigprocmask(SIG_BLOCK, mask, NULL);
return fd;
}
int signalfd(int fd, const sigset_t *mask, uintptr_t masksize) { return signalfd_impl(fd, mask, masksize, 0); }
static int timerfd_create(int clockid, int flags) {
int oflag = O_RDWR;
if (flags & TFD_CLOEXEC) oflag |= O_CLOEXEC;
if (flags & TFD_NONBLOCK) oflag |= O_NONBLOCK;
char path[64];
snprintf(path, sizeof(path), "/scheme/time/%d", clockid);
return open(path, oflag);
}
int timerfd_settime(int fd, int flags, const struct itimerspec *new_value, struct itimerspec *old_value) {
if (new_value == NULL) { errno = EFAULT; return -1; }
ssize_t r = write(fd, &new_value->it_value, sizeof(struct timespec));
return (r == sizeof(struct timespec)) ? 0 : -1;
}
int timerfd_gettime(int fd, struct itimerspec *curr) {
if (curr == NULL) { errno = EFAULT; return -1; }
curr->it_interval = (struct timespec){0};
ssize_t r = read(fd, &curr->it_value, sizeof(struct timespec));
return (r == sizeof(struct timespec)) ? 0 : -1;
}
#include "timespec-util.h"
#include "wayland-util.h"
#include "wayland-private.h"
@@ -81,7 +81,7 @@ if get_option('scanner')
endif
if meson.is_cross_build() or not get_option('scanner')
wayland_scanner_for_build = find_program('wayland-scanner', native: true)
wayland_scanner_for_build = find_program('wayland-scanner', native: true)
else
wayland_scanner_for_build = wayland_scanner
endif
@@ -646,15 +646,10 @@ wl_proxy_destroy(struct wl_proxy *proxy)
* \memberof wl_proxy
*/
WL_EXPORT int
wl_proxy_add_listener(struct wl_proxy *proxy,
void (**implementation)(void), void *data)
{
+ if (!proxy) {
+ fprintf(stderr, "FATAL: wl_proxy_add_listener(NULL) caller=%p — returning error\n",
+ __builtin_return_address(0));
+ return -1;
+ }
if (proxy->flags & WL_PROXY_FLAG_WRAPPER)
wl_proxy_add_listener(struct wl_proxy *proxy,
void (**implementation)(void), void *data)
{
if (proxy->flags & WL_PROXY_FLAG_WRAPPER)
wl_abort("Proxy %p is a wrapper\n", proxy);
if (proxy->object.implementation || proxy->dispatcher) {
@@ -2445,11 +2440,10 @@ wl_proxy_get_user_data(struct wl_proxy *proxy)
* \memberof wl_proxy
*/
WL_EXPORT uint32_t
wl_proxy_get_version(struct wl_proxy *proxy)
{
+ if (!proxy) return 0;
return proxy->version;
}
wl_proxy_get_version(struct wl_proxy *proxy)
{
return proxy->version;
}
/** Get the id of a proxy object
*
@@ -2565,10 +2559,9 @@ wl_proxy_get_interface(struct wl_proxy *proxy)
*/
WL_EXPORT struct wl_display *
wl_proxy_get_display(struct wl_proxy *proxy)
{
+ if (!proxy) return NULL;
return proxy->display;
}
{
return proxy->display;
}
/** Assign a proxy to an event queue
*
@@ -39,6 +39,7 @@
#include <dlfcn.h>
#include <sys/time.h>
#include <fcntl.h>
/* #include <sys/eventfd.h> */
#ifndef EFD_CLOEXEC
#define EFD_CLOEXEC O_CLOEXEC
#endif