pkgsrc-Changes archive

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

CVS commit: pkgsrc/mail/rspamd



Module Name:    pkgsrc
Committed By:   fhajny
Date:           Wed Jan 31 20:09:20 UTC 2018

Modified Files:
        pkgsrc/mail/rspamd: distinfo
Added Files:
        pkgsrc/mail/rspamd/patches: patch-config.h.in patch-src_lua_lua__util.c

Log Message:
mail/rspamd: Provide endian detection and fcntl support. Fixes SunOS builds.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 pkgsrc/mail/rspamd/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/mail/rspamd/patches/patch-config.h.in \
    pkgsrc/mail/rspamd/patches/patch-src_lua_lua__util.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mail/rspamd/distinfo
diff -u pkgsrc/mail/rspamd/distinfo:1.15 pkgsrc/mail/rspamd/distinfo:1.16
--- pkgsrc/mail/rspamd/distinfo:1.15    Fri Jun 23 13:47:05 2017
+++ pkgsrc/mail/rspamd/distinfo Wed Jan 31 20:09:20 2018
@@ -1,8 +1,10 @@
-$NetBSD: distinfo,v 1.15 2017/06/23 13:47:05 wiz Exp $
+$NetBSD: distinfo,v 1.16 2018/01/31 20:09:20 fhajny Exp $
 
 SHA1 (rspamd-1.6.1.tar.gz) = c2fb3b8aae561932b2cde746b77bdeb1ba5ea0c9
 RMD160 (rspamd-1.6.1.tar.gz) = 1576044887557da12075776dbf259e25f4d00dfe
 SHA512 (rspamd-1.6.1.tar.gz) = 3bd50ebc1d7e413afbe52608f94b644e1cf684a708776207710eb4556abb0500b2a23141a90e811854a25a9fbedf0a6b1c5a05363c0cf372921b8acd457b702b
 Size (rspamd-1.6.1.tar.gz) = 2462565 bytes
 SHA1 (patch-CMakeLists.txt) = 1d3e66b52ef38638674baf4c10b68c97b2ca38ad
+SHA1 (patch-config.h.in) = 1e626956227dc69fb781ce5847e0f9f8eaee8c09
 SHA1 (patch-src_CMakeLists.txt) = c80015bb275ba8b9ad31491311275bf353f8f30a
+SHA1 (patch-src_lua_lua__util.c) = 9aebe7e7d88e4dced48cf5016ce932b2da5020d0

Added files:

Index: pkgsrc/mail/rspamd/patches/patch-config.h.in
diff -u /dev/null pkgsrc/mail/rspamd/patches/patch-config.h.in:1.1
--- /dev/null   Wed Jan 31 20:09:20 2018
+++ pkgsrc/mail/rspamd/patches/patch-config.h.in        Wed Jan 31 20:09:20 2018
@@ -0,0 +1,20 @@
+$NetBSD: patch-config.h.in,v 1.1 2018/01/31 20:09:20 fhajny Exp $
+
+Add endianness support for earlier SunOS platforms.
+
+--- config.h.in.orig   2017-06-14 14:45:41.000000000 +0000
++++ config.h.in
+@@ -151,6 +151,13 @@
+  #include <sys/endian.h>
+ #elif defined(HAVE_MACHINE_ENDIAN_H)
+  #include <machine/endian.h>
++#elif defined(__sun)
++ #include <sys/byteorder.h>
++ #ifdef _LITTLE_ENDIAN
++  #define BYTE_ORDER LITTLE_ENDIAN
++ #else
++  #define BYTE_ORDER BIG_ENDIAN
++ #endif
+ #endif
+ 
+ #ifndef BYTE_ORDER
Index: pkgsrc/mail/rspamd/patches/patch-src_lua_lua__util.c
diff -u /dev/null pkgsrc/mail/rspamd/patches/patch-src_lua_lua__util.c:1.1
--- /dev/null   Wed Jan 31 20:09:20 2018
+++ pkgsrc/mail/rspamd/patches/patch-src_lua_lua__util.c        Wed Jan 31 20:09:20 2018
@@ -0,0 +1,62 @@
+$NetBSD: patch-src_lua_lua__util.c,v 1.1 2018/01/31 20:09:20 fhajny Exp $
+
+Add fcntl support (namely for SunOS).
+
+--- src/lua/lua_util.c.orig    2017-06-14 14:45:41.000000000 +0000
++++ src/lua/lua_util.c
+@@ -1544,6 +1544,15 @@ lua_util_lock_file (lua_State *L)
+       gint fd = -1;
+       gboolean own = FALSE;
+ 
++#if !HAVE_FLOCK
++      struct flock fl = {
++              .l_type = F_WRLCK,
++              .l_whence = SEEK_SET,
++              .l_start = 0,
++              .l_len = 0
++      };
++#endif
++
+       fpath = luaL_checkstring (L, 1);
+ 
+       if (fpath) {
+@@ -1562,7 +1571,11 @@ lua_util_lock_file (lua_State *L)
+                       return 2;
+               }
+ 
++#if HAVE_FLOCK
+               if (flock (fd, LOCK_EX) == -1) {
++#else
++              if (fcntl (fd, F_SETLKW, &fl) == -1) {
++#endif
+                       lua_pushnil (L);
+                       lua_pushstring (L, strerror (errno));
+ 
+@@ -1588,6 +1601,15 @@ lua_util_unlock_file (lua_State *L)
+       gint fd = -1, ret, serrno;
+       gboolean do_close = TRUE;
+ 
++#if !HAVE_FLOCK
++      struct flock fl = {
++              .l_type = F_UNLCK,
++              .l_whence = SEEK_SET,
++              .l_start = 0,
++              .l_len = 0
++      };
++#endif
++
+       if (lua_isnumber (L, 1)) {
+               fd = lua_tonumber (L, 1);
+ 
+@@ -1595,7 +1617,11 @@ lua_util_unlock_file (lua_State *L)
+                       do_close = lua_toboolean (L, 2);
+               }
+ 
++#if HAVE_FLOCK
+               ret = flock (fd, LOCK_UN);
++#else
++              ret = fcntl (fd, F_SETLKW, &fl);
++#endif
+ 
+               if (do_close) {
+                       serrno = errno;



Home | Main Index | Thread Index | Old Index