pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/x11/lxsession Add SunOS flock compat.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ee744bc01f64
branches:  trunk
changeset: 364864:ee744bc01f64
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Thu Jul 06 09:18:41 2017 +0000

description:
Add SunOS flock compat.

diffstat:

 x11/lxsession/distinfo                                          |   3 +-
 x11/lxsession/patches/patch-lxsession-logout_lxsession-logout.c |  23 ++++++++++
 2 files changed, 25 insertions(+), 1 deletions(-)

diffs (40 lines):

diff -r 24c15c5ccdd3 -r ee744bc01f64 x11/lxsession/distinfo
--- a/x11/lxsession/distinfo    Thu Jul 06 09:09:02 2017 +0000
+++ b/x11/lxsession/distinfo    Thu Jul 06 09:18:41 2017 +0000
@@ -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 -r 24c15c5ccdd3 -r ee744bc01f64 x11/lxsession/patches/patch-lxsession-logout_lxsession-logout.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/lxsession/patches/patch-lxsession-logout_lxsession-logout.c   Thu Jul 06 09:18:41 2017 +0000
@@ -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);
+         }



Home | Main Index | Thread Index | Old Index