summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-08-31 21:58:04 -0700
committerKhem Raj <raj.khem@gmail.com>2022-09-05 22:49:34 -0700
commit17b49ec92483631e3abdd69ec5f51f68374b8cbd (patch)
treef075f5a7231d5a5439f736f3fcdc58f760971576
parent97f3a9e4a87aaa46fde1d5a1ca0903931432016a (diff)
downloadmeta-openembedded-17b49ec92483631e3abdd69ec5f51f68374b8cbd.tar.gz
lxdm: Fix msghdr initialization on musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-graphics/lxdm/lxdm/0001-Initialize-msghdr-struct-in-a-portable-way.patch40
-rw-r--r--meta-oe/recipes-graphics/lxdm/lxdm_0.5.3.bb1
2 files changed, 41 insertions, 0 deletions
diff --git a/meta-oe/recipes-graphics/lxdm/lxdm/0001-Initialize-msghdr-struct-in-a-portable-way.patch b/meta-oe/recipes-graphics/lxdm/lxdm/0001-Initialize-msghdr-struct-in-a-portable-way.patch
new file mode 100644
index 000000000..d4779505d
--- /dev/null
+++ b/meta-oe/recipes-graphics/lxdm/lxdm/0001-Initialize-msghdr-struct-in-a-portable-way.patch
@@ -0,0 +1,40 @@
1From 7c370576b4fb7c7d3b6dbf33125136a4ae70a330 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 31 Aug 2022 21:52:16 -0700
4Subject: [PATCH] Initialize msghdr struct in a portable way
5
6Initializing the structure assuming glibc layout results in
7compile errors on musl, therefore do partial intialization and then
8assigning the members individually.
9
10Upstream-Status: Submitted [https://sourceforge.net/p/lxdm/code/merge-requests/4/]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 src/lxcom.c | 9 +++++++--
14 2 files changed, 10 insertions(+), 5 deletions(-)
15
16diff --git a/src/lxcom.c b/src/lxcom.c
17index 397d1b5..517c775 100644
18--- a/src/lxcom.c
19+++ b/src/lxcom.c
20@@ -117,10 +117,15 @@ static gboolean lxcom_dispatch (GSource *source,GSourceFunc callback,gpointer us
21 char ctrl[/*CMSG_SPACE(sizeof(LXDM_CRED))*/1024];
22 struct sockaddr_un peer;
23 struct iovec v={buf,sizeof(buf)};
24- struct msghdr h={&peer,sizeof(peer),&v,1,ctrl,sizeof(ctrl),0};
25+ struct msghdr h={0};
26 struct cmsghdr *cmptr;
27 int ret;
28-
29+ h.msg_name = &peer;
30+ h.msg_namelen = sizeof(peer);
31+ h.msg_iov = &v;
32+ h.msg_iovlen = 1;
33+ h.msg_control = ctrl;
34+ h.msg_controllen = sizeof(ctrl);
35 while(1)
36 {
37 peer.sun_family=0;
38--
392.37.3
40
diff --git a/meta-oe/recipes-graphics/lxdm/lxdm_0.5.3.bb b/meta-oe/recipes-graphics/lxdm/lxdm_0.5.3.bb
index 83b15ce8e..adf9cb597 100644
--- a/meta-oe/recipes-graphics/lxdm/lxdm_0.5.3.bb
+++ b/meta-oe/recipes-graphics/lxdm/lxdm_0.5.3.bb
@@ -19,6 +19,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}%20${PV}/${BPN}-${PV}.tar.
19 file://0008-greeter.c-show-information-on-gtk-label-info.patch \ 19 file://0008-greeter.c-show-information-on-gtk-label-info.patch \
20 file://0009-greeter.c-disallow-empty-new-password.patch \ 20 file://0009-greeter.c-disallow-empty-new-password.patch \
21 file://0001-systemd-lxdm.service-remove-plymouth-quit-conflicts.patch \ 21 file://0001-systemd-lxdm.service-remove-plymouth-quit-conflicts.patch \
22 file://0001-Initialize-msghdr-struct-in-a-portable-way.patch \
22 " 23 "
23SRC_URI[md5sum] = "061caae432634e6db38bbdc84bc6ffa0" 24SRC_URI[md5sum] = "061caae432634e6db38bbdc84bc6ffa0"
24SRC_URI[sha256sum] = "4891efee81c72a400cc6703e40aa76f3f3853833d048b72ec805da0f93567f2f" 25SRC_URI[sha256sum] = "4891efee81c72a400cc6703e40aa76f3f3853833d048b72ec805da0f93567f2f"