summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2017-07-06 09:18:41 +0000
committerjperkin <jperkin@pkgsrc.org>2017-07-06 09:18:41 +0000
commitd9af701daad15cde442dd9947a427724b9d42391 (patch)
tree17c05179ea508943a6dd78406ff24cadfb42c055 /x11
parent4c51d0adcaa2248e5c3acf42a977a290b8b795a3 (diff)
downloadpkgsrc-d9af701daad15cde442dd9947a427724b9d42391.tar.gz
Add SunOS flock compat.
Diffstat (limited to 'x11')
-rw-r--r--x11/lxsession/distinfo3
-rw-r--r--x11/lxsession/patches/patch-lxsession-logout_lxsession-logout.c23
2 files changed, 25 insertions, 1 deletions
diff --git a/x11/lxsession/distinfo b/x11/lxsession/distinfo
index fe7285bfb9c..46c002b1271 100644
--- a/x11/lxsession/distinfo
+++ b/x11/lxsession/distinfo
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.3 2016/05/23 08:56:21 youri Exp $
+$NetBSD: distinfo,v 1.4 2017/07/06 09:18:41 jperkin Exp $
SHA1 (lxsession-0.5.2.tar.xz) = 00d45cccbdd6fb05c46998671a7c12123a0a2179
RMD160 (lxsession-0.5.2.tar.xz) = 81a379a4c32085447034e965e19c840eb82588dc
SHA512 (lxsession-0.5.2.tar.xz) = 2e08e5263bb4ef9d8051e84997347a12d2f1ba75cf4e70f9e3ba783a509246f0d6efd672ac1cc1d0fffc8707710ddb148298449b5365deb6785623d596bc3da1
Size (lxsession-0.5.2.tar.xz) = 354092 bytes
SHA1 (patch-data_Makefile.in) = ec76ab351a3417b71e80f8201808174e63c8f2da
+SHA1 (patch-lxsession-logout_lxsession-logout.c) = fbe1b5b09a8678912d0cea5affbd70ed11a195d4
diff --git a/x11/lxsession/patches/patch-lxsession-logout_lxsession-logout.c b/x11/lxsession/patches/patch-lxsession-logout_lxsession-logout.c
new file mode 100644
index 00000000000..c272c82a72f
--- /dev/null
+++ b/x11/lxsession/patches/patch-lxsession-logout_lxsession-logout.c
@@ -0,0 +1,23 @@
+$NetBSD: patch-lxsession-logout_lxsession-logout.c,v 1.1 2017/07/06 09:18:41 jperkin Exp $
+
+SunOS flock compat.
+
+--- lxsession-logout/lxsession-logout.c.orig 2014-11-29 14:43:14.000000000 +0000
++++ lxsession-logout/lxsession-logout.c
+@@ -485,7 +485,16 @@ int main(int argc, char * argv[])
+ int fd = open(lockfile, O_RDONLY|O_CREAT, 00600);
+ if (fd >= 0)
+ {
++#ifdef __sun
++ struct flock lock;
++ lock.l_start = 0;
++ lock.l_len = 0;
++ lock.l_whence = SEEK_SET;
++ lock.l_type = F_WRLCK;
++ if (fcntl(fd, F_SETLK, &lock))
++#else
+ if (flock(fd, LOCK_EX | LOCK_NB))
++#endif
+ {
+ exit(EXIT_FAILURE);
+ }