aboutsummaryrefslogtreecommitdiffstats
path: root/community/lxdm/fix-msghdr-usage.patch
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-02-24 18:47:13 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-02-24 23:29:30 -0300
commitdf89894184cec38310eb2ca8220ce2fbf1705a43 (patch)
treed4939f2a7de83ee4189d234d16d236b8fc072ad1 /community/lxdm/fix-msghdr-usage.patch
parent85a804c4e18f5ef1fa17b4b3be275846a7ec4405 (diff)
downloadaports-df89894184cec38310eb2ca8220ce2fbf1705a43.tar.bz2
aports-df89894184cec38310eb2ca8220ce2fbf1705a43.tar.xz
community/lxdm: move from main
Diffstat (limited to 'community/lxdm/fix-msghdr-usage.patch')
-rw-r--r--community/lxdm/fix-msghdr-usage.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/community/lxdm/fix-msghdr-usage.patch b/community/lxdm/fix-msghdr-usage.patch
new file mode 100644
index 0000000000..7840c59b12
--- /dev/null
+++ b/community/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)