pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

wayland: fix build



Module Name:	pkgsrc-wip
Committed By:	kikadf <kikadf.01%gmail.com@localhost>
Pushed By:	kikadf
Date:		Fri Sep 12 17:52:35 2025 +0200
Changeset:	c1d6d9c5b6f20da39c9ca0f8a4e16a2e13a4dd4d

Modified Files:
	wayland/PLIST
	wayland/TODO
	wayland/distinfo
Added Files:
	wayland/patches/patch-src_wayland-os.c

Log Message:
wayland: fix build

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c1d6d9c5b6f20da39c9ca0f8a4e16a2e13a4dd4d

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 wayland/PLIST                          |  6 +++---
 wayland/TODO                           |  7 -------
 wayland/distinfo                       |  1 +
 wayland/patches/patch-src_wayland-os.c | 31 +++++++++++++++++++++++++++++++
 4 files changed, 35 insertions(+), 10 deletions(-)

diffs:
diff --git a/wayland/PLIST b/wayland/PLIST
index 9e651a541a..45d87ea115 100644
--- a/wayland/PLIST
+++ b/wayland/PLIST
@@ -14,16 +14,16 @@ include/wayland-util.h
 include/wayland-version.h
 lib/libwayland-client.so
 lib/libwayland-client.so.0
-lib/libwayland-client.so.0.23.0
+lib/libwayland-client.so.0.24.0
 lib/libwayland-cursor.so
 lib/libwayland-cursor.so.0
-lib/libwayland-cursor.so.0.23.0
+lib/libwayland-cursor.so.0.24.0
 lib/libwayland-egl.so
 lib/libwayland-egl.so.1
 lib/libwayland-egl.so.${PKGVERSION}
 lib/libwayland-server.so
 lib/libwayland-server.so.0
-lib/libwayland-server.so.0.23.0
+lib/libwayland-server.so.0.24.0
 lib/pkgconfig/wayland-client.pc
 lib/pkgconfig/wayland-cursor.pc
 lib/pkgconfig/wayland-egl-backend.pc
diff --git a/wayland/TODO b/wayland/TODO
index ec537380d6..8b13789179 100644
--- a/wayland/TODO
+++ b/wayland/TODO
@@ -1,8 +1 @@
-NetBSD doesn't provide neither SO_PEERCRED nor LOCAL_PEERCRED
-but wayland 1.24.0 would like to get the socket peer credentials,
-leading to
-
-../src/wayland-os.c:129:2: error: #error "Don't know how to read ucred on this platform"
-  129 | #error "Don't know how to read ucred on this platform"
-      |  ^~~~~
 
diff --git a/wayland/distinfo b/wayland/distinfo
index 76e4be54d5..8a2dce26a6 100644
--- a/wayland/distinfo
+++ b/wayland/distinfo
@@ -7,3 +7,4 @@ SHA1 (patch-meson.build) = de540a3d1f72d258b377a1e41325064f425e7534
 SHA1 (patch-meson__options.txt) = af930cd03994d7a2202af97b17939555c3aa7409
 SHA1 (patch-scanner.c) = 68629112c5518aeaecbf831d14bea53168c1bc95
 SHA1 (patch-src_meson.build) = 47bb46d9af0ab428667bebbed36b09f0b0b9c414
+SHA1 (patch-src_wayland-os.c) = 8bbd574108e06697c874d372062d3129eb7937d1
diff --git a/wayland/patches/patch-src_wayland-os.c b/wayland/patches/patch-src_wayland-os.c
new file mode 100644
index 0000000000..4d1f2ba92a
--- /dev/null
+++ b/wayland/patches/patch-src_wayland-os.c
@@ -0,0 +1,31 @@
+$NetBSD: patch-src_wayland-os.c,v 1.4 2022/08/04 15:21:26 nia Exp $
+
+Support for NetBSD.
+
+--- src/wayland-os.c.orig	2022-06-30 21:59:11.000000000 +0000
++++ src/wayland-os.c
+@@ -100,6 +100,24 @@ wl_os_socket_peercred(int sockfd, uid_t 
+ #endif
+ 	return 0;
+ }
++#elif defined(__NetBSD__)
++#ifndef SOL_LOCAL
++#define SOL_LOCAL (0)
++#endif
++int
++wl_os_socket_peercred(int sockfd, uid_t *uid, gid_t *gid, pid_t *pid)
++{
++	socklen_t len;
++	struct sockcred ucred;
++
++	len = sizeof(ucred);
++	if (getsockopt(sockfd, SOL_LOCAL, LOCAL_CREDS, &ucred, &len) < 0)
++		return -1;
++	*uid = ucred.sc_uid;
++	*gid = ucred.sc_gid;
++	*pid = 0;
++	return 0;
++}
+ #elif defined(SO_PEERCRED)
+ int
+ wl_os_socket_peercred(int sockfd, uid_t *uid, gid_t *gid, pid_t *pid)


Home | Main Index | Thread Index | Old Index