pkgsrc-Changes archive

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

CVS commit: pkgsrc/net/lua-socket



Module Name:    pkgsrc
Committed By:   sborrill
Date:           Thu Feb 26 17:09:47 UTC 2026

Modified Files:
        pkgsrc/net/lua-socket: Makefile distinfo
Added Files:
        pkgsrc/net/lua-socket/patches: patch-src_unixdgram.c
            patch-src_unixstream.c

Log Message:
lua-socket: fix build on SunOS

Use the SUN_LEN() macro if present.
Tested on NetBSD too.
Fixes PR/60039.
Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 pkgsrc/net/lua-socket/Makefile
cvs rdiff -u -r1.10 -r1.11 pkgsrc/net/lua-socket/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/net/lua-socket/patches/patch-src_unixdgram.c \
    pkgsrc/net/lua-socket/patches/patch-src_unixstream.c

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

Modified files:

Index: pkgsrc/net/lua-socket/Makefile
diff -u pkgsrc/net/lua-socket/Makefile:1.15 pkgsrc/net/lua-socket/Makefile:1.16
--- pkgsrc/net/lua-socket/Makefile:1.15 Tue Nov 25 15:35:26 2025
+++ pkgsrc/net/lua-socket/Makefile      Thu Feb 26 17:09:47 2026
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.15 2025/11/25 15:35:26 sborrill Exp $
+# $NetBSD: Makefile,v 1.16 2026/02/26 17:09:47 sborrill Exp $
 
 DISTNAME=              luasocket-3.1.0
+PKGREVISION=           1
 PKGNAME=               ${LUA_PKGPREFIX}-${DISTNAME:S/lua//}
 CATEGORIES=            net lua
 MASTER_SITES=          -https://github.com/lunarmodules/luasocket/archive/v${PKGVERSION}.tar.gz

Index: pkgsrc/net/lua-socket/distinfo
diff -u pkgsrc/net/lua-socket/distinfo:1.10 pkgsrc/net/lua-socket/distinfo:1.11
--- pkgsrc/net/lua-socket/distinfo:1.10 Tue Nov 25 15:35:26 2025
+++ pkgsrc/net/lua-socket/distinfo      Thu Feb 26 17:09:47 2026
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.10 2025/11/25 15:35:26 sborrill Exp $
+$NetBSD: distinfo,v 1.11 2026/02/26 17:09:47 sborrill Exp $
 
 BLAKE2s (luasocket-3.1.0.tar.gz) = 59d162c2aae610535f943668b69730c6241aa687ac86bf3ee6c161bd0a2fb96a
 SHA512 (luasocket-3.1.0.tar.gz) = 1e9e98484740ec6538fe3d2b0dab74d31f052956ecf9ee3b60e229f2d0b13fcc6d4aaf74cd2a3e2ee330333dabb316fe6a43c60baaea26f0cc01069b6aa4519b
@@ -6,3 +6,5 @@ Size (luasocket-3.1.0.tar.gz) = 336542 b
 SHA1 (patch-gem_myps2pdf) = e6acb0e23f932498fb5420f0fbc1c0e33978c1ca
 SHA1 (patch-makefile) = 57b7643199e37e51f96dac857cfbbf1730611d8d
 SHA1 (patch-src_makefile) = 71dcc4763731888561abc7799ba0156e563ab7ee
+SHA1 (patch-src_unixdgram.c) = dcf5d04ab86d512bb6294d965719514ce1c26fe0
+SHA1 (patch-src_unixstream.c) = deb41de189ebad1cb24fb24812cd8b89960a4aad

Added files:

Index: pkgsrc/net/lua-socket/patches/patch-src_unixdgram.c
diff -u /dev/null pkgsrc/net/lua-socket/patches/patch-src_unixdgram.c:1.1
--- /dev/null   Thu Feb 26 17:09:48 2026
+++ pkgsrc/net/lua-socket/patches/patch-src_unixdgram.c Thu Feb 26 17:09:47 2026
@@ -0,0 +1,35 @@
+$NetBSD: patch-src_unixdgram.c,v 1.1 2026/02/26 17:09:47 sborrill Exp $
+
+Use SUN_LEN macro if we have it
+
+--- src/unixdgram.c.orig       2026-02-26 16:40:26.691051280 +0000
++++ src/unixdgram.c    2026-02-26 16:42:49.549449941 +0000
+@@ -152,9 +152,7 @@
+     remote.sun_family = AF_UNIX;
+     timeout_markstart(tm);
+ #ifdef UNIX_HAS_SUN_LEN
+-    remote.sun_len = sizeof(remote.sun_family) + sizeof(remote.sun_len)
+-        + len + 1;
+-    err = socket_sendto(&un->sock, data, count, &sent, (SA *) &remote, remote.sun_len, tm);
++    err = socket_sendto(&un->sock, data, count, &sent, (SA *) &remote, SUN_LEN(&remote), tm);
+ #else
+     err = socket_sendto(&un->sock, data, count, &sent, (SA *) &remote,
+                       sizeof(remote.sun_family) + len, tm);
+@@ -273,7 +271,7 @@
+     local.sun_family = AF_UNIX;
+     size_t addrlen = SUN_LEN(&local);
+ #ifdef UNIX_HAS_SUN_LEN
+-    local.sun_len = addrlen + 1;
++/*    local.sun_len = addrlen + 1;*/
+ #endif
+     int err = socket_bind(&un->sock, (SA *) &local, addrlen);
+     if (err != IO_DONE) socket_destroy(&un->sock);
+@@ -324,7 +322,7 @@
+     timeout_markstart(&un->tm);
+     size_t addrlen = SUN_LEN(&remote);
+ #ifdef UNIX_HAS_SUN_LEN
+-    remote.sun_len = addrlen + 1;
++/*    remote.sun_len = addrlen + 1;*/
+ #endif
+     int err = socket_connect(&un->sock, (SA *) &remote, addrlen, &un->tm);
+     if (err != IO_DONE) socket_destroy(&un->sock);
Index: pkgsrc/net/lua-socket/patches/patch-src_unixstream.c
diff -u /dev/null pkgsrc/net/lua-socket/patches/patch-src_unixstream.c:1.1
--- /dev/null   Thu Feb 26 17:09:48 2026
+++ pkgsrc/net/lua-socket/patches/patch-src_unixstream.c        Thu Feb 26 17:09:47 2026
@@ -0,0 +1,28 @@
+$NetBSD: patch-src_unixstream.c,v 1.1 2026/02/26 17:09:47 sborrill Exp $
+
+Use SUN_LEN macro if we have it
+
+--- src/unixstream.c.orig      2026-02-26 16:40:15.320147930 +0000
++++ src/unixstream.c   2026-02-26 16:46:11.527946740 +0000
+@@ -190,9 +190,7 @@
+     strcpy(local.sun_path, path);
+     local.sun_family = AF_UNIX;
+ #ifdef UNIX_HAS_SUN_LEN
+-    local.sun_len = sizeof(local.sun_family) + sizeof(local.sun_len)
+-        + len + 1;
+-    err = socket_bind(&un->sock, (SA *) &local, local.sun_len);
++    err = socket_bind(&un->sock, (SA *) &local, SUN_LEN(&local));
+ 
+ #else
+     err = socket_bind(&un->sock, (SA *) &local,
+@@ -245,9 +243,7 @@
+     remote.sun_family = AF_UNIX;
+     timeout_markstart(&un->tm);
+ #ifdef UNIX_HAS_SUN_LEN
+-    remote.sun_len = sizeof(remote.sun_family) + sizeof(remote.sun_len)
+-        + len + 1;
+-    err = socket_connect(&un->sock, (SA *) &remote, remote.sun_len, &un->tm);
++    err = socket_connect(&un->sock, (SA *) &remote, SUN_LEN(&remote), &un->tm);
+ #else
+     err = socket_connect(&un->sock, (SA *) &remote,
+             sizeof(remote.sun_family) + len, &un->tm);



Home | Main Index | Thread Index | Old Index