pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/net/stund
Module Name: pkgsrc
Committed By: nia
Date: Thu May 15 11:40:32 UTC 2025
Modified Files:
pkgsrc/net/stund: Makefile distinfo
pkgsrc/net/stund/patches: patch-stun.cxx
Log Message:
stund: Various portability improvements
- Remove the assembler (and Solaris-specific) methods for seeding the
RNG and just use /dev/urandom everywhere. This fixes the build on
sparc64.
- My (much earlier) attempt at fixing the build on SunOS wasn't quite
right - SunOS needs -DBSD_COMP to expose all ioctl definitions.
Confirmed to build on FreeBSD, OpenBSD, NetBSD, Linux (modern & retro),
SunOS by drecklypkg ci.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 pkgsrc/net/stund/Makefile pkgsrc/net/stund/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/net/stund/patches/patch-stun.cxx
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/net/stund/Makefile
diff -u pkgsrc/net/stund/Makefile:1.5 pkgsrc/net/stund/Makefile:1.6
--- pkgsrc/net/stund/Makefile:1.5 Wed Aug 2 19:30:57 2023
+++ pkgsrc/net/stund/Makefile Thu May 15 11:40:32 2025
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.5 2023/08/02 19:30:57 nia Exp $
+# $NetBSD: Makefile,v 1.6 2025/05/15 11:40:32 nia Exp $
DISTNAME= stund-0.97
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=stun/}
EXTRACT_SUFX= .tgz
@@ -17,6 +18,10 @@ USE_TOOLS+= gmake
# Fails with C++14 default language
FORCE_CXX_STD= c++03
+# Necessary to get ioctl definitions.
+CPPFLAGS.SunOS+= -DBSD_COMP
+LDFLAGS.SunOS+= -lsocket -lnsl
+
INSTALLATION_DIRS= bin sbin share/doc/stund
do-install:
Index: pkgsrc/net/stund/distinfo
diff -u pkgsrc/net/stund/distinfo:1.5 pkgsrc/net/stund/distinfo:1.6
--- pkgsrc/net/stund/distinfo:1.5 Thu Oct 10 20:18:02 2024
+++ pkgsrc/net/stund/distinfo Thu May 15 11:40:32 2025
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.5 2024/10/10 20:18:02 nia Exp $
+$NetBSD: distinfo,v 1.6 2025/05/15 11:40:32 nia Exp $
BLAKE2s (stund-0.97.tgz) = c42c11bba37d0251348b5027ec81acf12f2131d1bb5a143c14f3d5da263319a5
SHA512 (stund-0.97.tgz) = 8f32d4fadf7264967a8cdabf410b9cd495e1f4dc6198d5efe07559996697db088a8a6b1b5fd0814c1a04fe8c17c866256d6a59b719a153fd23c26939d3c6bc1a
Size (stund-0.97.tgz) = 169558 bytes
-SHA1 (patch-stun.cxx) = c145c74556803bf10c177700d9095f86cc846af9
+SHA1 (patch-stun.cxx) = a1015b8c7e9262dd50b5f08e70769679e31a7022
SHA1 (patch-udp.h) = 0bc0c4254596fc9018f5bdc4d5dd96d6000bcbb6
Index: pkgsrc/net/stund/patches/patch-stun.cxx
diff -u pkgsrc/net/stund/patches/patch-stun.cxx:1.2 pkgsrc/net/stund/patches/patch-stun.cxx:1.3
--- pkgsrc/net/stund/patches/patch-stun.cxx:1.2 Thu Oct 10 20:18:02 2024
+++ pkgsrc/net/stund/patches/patch-stun.cxx Thu May 15 11:40:32 2025
@@ -1,19 +1,17 @@
-$NetBSD: patch-stun.cxx,v 1.2 2024/10/10 20:18:02 nia Exp $
+$NetBSD: patch-stun.cxx,v 1.3 2025/05/15 11:40:32 nia Exp $
+
+Portable RNG seeding.
--- stun.cxx.orig 2012-01-26 11:02:46.000000000 +0000
+++ stun.cxx
-@@ -16,6 +16,7 @@
- #include <string.h>
- #include <sys/ioctl.h>
- #include <sys/socket.h>
-+#include <sys/sockio.h>
- #include <sys/time.h>
- #include <sys/types.h>
- #include <arpa/inet.h>
-@@ -673,12 +674,10 @@ stunRand()
- asm("rdtsc" : "=A" (tick));
- #elif defined (__SUNPRO_CC) || defined( __sparc__ )
- tick = gethrtime();
+@@ -669,16 +669,10 @@ stunRand()
+ tick = hightick;
+ tick <<= 32;
+ tick |= lowtick;
+-#elif defined(__GNUC__) && ( defined(__i686__) || defined(__i386__) )
+- asm("rdtsc" : "=A" (tick));
+-#elif defined (__SUNPRO_CC) || defined( __sparc__ )
+- tick = gethrtime();
-#elif defined(__MACH__) || defined(__linux)
- int fd=open("/dev/random",O_RDONLY);
+#else
Home |
Main Index |
Thread Index |
Old Index