aboutsummaryrefslogtreecommitdiffstats
path: root/main/lxdm/fix-msghdr-usage.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-07-18 11:25:02 +0300
committerTimo Teräs <timo.teras@iki.fi>2014-07-18 11:25:02 +0300
commit74e3144f1a2e9d8525505e5301ffbff7609ce029 (patch)
treef8a56d1d03fc0800c0841f2a9c6ed4949c43f424 /main/lxdm/fix-msghdr-usage.patch
parentafdcd4028b69c64298ce535b1dccc0c3725bc4a0 (diff)
downloadaports-74e3144f1a2e9d8525505e5301ffbff7609ce029.tar.bz2
aports-74e3144f1a2e9d8525505e5301ffbff7609ce029.tar.xz
main/lxdm: fix 64-bit musl build
use designed initializer for msghdr since it contains __pad members on musl/64-bit.
Diffstat (limited to 'main/lxdm/fix-msghdr-usage.patch')
-rw-r--r--main/lxdm/fix-msghdr-usage.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/main/lxdm/fix-msghdr-usage.patch b/main/lxdm/fix-msghdr-usage.patch
new file mode 100644
index 0000000000..7840c59b12
--- /dev/null
+++ b/main/lxdm/fix-msghdr-usage.patch
@@ -0,0 +1,40 @@
+diff -ru lxdm-0.5.0.orig/src/lxcom.c lxdm-0.5.0/src/lxcom.c
+--- lxdm-0.5.0.orig/src/lxcom.c 2013-10-04 10:40:08.000000000 -0300
++++ lxdm-0.5.0/src/lxcom.c 2014-07-18 11:21:22.734631159 -0300
+@@ -116,12 +116,20 @@
+ char buf[4096];
+ char ctrl[/*CMSG_SPACE(sizeof(LXDM_CRED))*/1024];
+ struct sockaddr_un peer;
+- struct iovec v={buf,sizeof(buf)};
+- struct msghdr h={&peer,sizeof(peer),&v,1,ctrl,sizeof(ctrl),0};
+ struct cmsghdr *cmptr;
+ int ret;
+
+- while(1)
++ while (1)
+ {
++ struct iovec v={buf,sizeof(buf)};
++ struct msghdr h={
++ .msg_name = &peer,
++ .msg_namelen = sizeof(peer),
++ .msg_iov = &v,
++ .msg_iovlen = 1,
++ .msg_control = ctrl,
++ .msg_controllen = sizeof(ctrl)
++ };
++
+ peer.sun_family=0;
+ ret=recvmsg(self_server_fd,&h,0);
+
+@@ -315,7 +323,10 @@
+ static ssize_t lxcom_write(int s,const void *buf,size_t count)
+ {
+ struct iovec iov[1] ={{(void*)buf,count,}};
+- struct msghdr msg = { 0, 0, iov, 1, 0, 0, 0 };
++ struct msghdr msg = {
++ .msg_iov = iov,
++ .msg_iovlen = 1
++ };
+ #if !defined(linux) && !defined(__NetBSD__)
+
+ #if defined(__sun)