pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/security/botan2 botan2: fix build of os_utils.cpp on S...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/326b15c70e19
branches:  trunk
changeset: 390463:326b15c70e19
user:      nros <nros%pkgsrc.org@localhost>
date:      Mon Dec 19 17:39:40 2022 +0000

description:
botan2: fix build of os_utils.cpp on SunOS

os_utils.cpp needs priv.h to be included on
SunOS for the patch to build.
Use Botans own BOTAN_TARGET_OS_IS_SOLARIS
instead of __sun as indicator for building
on SunOS.

diffstat:

 security/botan2/distinfo                                  |   4 +-
 security/botan2/patches/patch-src_lib_utils_os__utils.cpp |  19 +++++++++++---
 2 files changed, 17 insertions(+), 6 deletions(-)

diffs (48 lines):

diff -r b53855afc34f -r 326b15c70e19 security/botan2/distinfo
--- a/security/botan2/distinfo  Mon Dec 19 17:15:34 2022 +0000
+++ b/security/botan2/distinfo  Mon Dec 19 17:39:40 2022 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.3 2022/11/24 11:59:30 wiz Exp $
+$NetBSD: distinfo,v 1.4 2022/12/19 17:39:40 nros Exp $
 
 BLAKE2s (Botan-2.19.3.tar.xz) = 124eb756725b0b7fe63a89617940271a6e99cee91ca1f6ca986ce432b7f8fc22
 SHA512 (Botan-2.19.3.tar.xz) = 80012397e2aa7cc88a9536340ac9b770d1195fddda53b9d4cfde82318dd05f9d4f925bbdff773aba99883a701f4d30581e9d5c97e915fa80c3ca2acfa5a92110
 Size (Botan-2.19.3.tar.xz) = 6105896 bytes
 SHA1 (patch-configure.py) = 2688fe59474bf3de425b49d2e0c9c1f4ecccfd16
 SHA1 (patch-src_build-data_os_openbsd.txt) = 7858a819d457e0cb18a5b9d608c386bee36813ee
-SHA1 (patch-src_lib_utils_os__utils.cpp) = ab44b46c0a9a649f055dc7cd8f54c6ffdf8246cb
+SHA1 (patch-src_lib_utils_os__utils.cpp) = cf914c9566e7c0f376b045c85bb39fb6a573b225
diff -r b53855afc34f -r 326b15c70e19 security/botan2/patches/patch-src_lib_utils_os__utils.cpp
--- a/security/botan2/patches/patch-src_lib_utils_os__utils.cpp Mon Dec 19 17:15:34 2022 +0000
+++ b/security/botan2/patches/patch-src_lib_utils_os__utils.cpp Mon Dec 19 17:39:40 2022 +0000
@@ -1,15 +1,26 @@
-$NetBSD: patch-src_lib_utils_os__utils.cpp,v 1.1 2022/04/01 08:01:12 wiz Exp $
+$NetBSD: patch-src_lib_utils_os__utils.cpp,v 1.2 2022/12/19 17:39:40 nros Exp $
 
 Add check for ability to do mlock() on SunOS.
 
---- src/lib/utils/os_utils.cpp.orig    2019-07-15 18:14:39.932394200 +0000
+--- src/lib/utils/os_utils.cpp.orig    2022-11-16 11:19:19.000000000 +0000
 +++ src/lib/utils/os_utils.cpp
-@@ -325,7 +325,21 @@ size_t OS::system_page_size()
+@@ -60,6 +60,10 @@
+   #include <mach/vm_statistics.h>
+ #endif
+ 
++#if defined(BOTAN_TARGET_OS_IS_SOLARIS)
++#  include <priv.h>
++#endif
++
+ namespace Botan {
+ 
+ // Not defined in OS namespace for historical reasons
+@@ -326,7 +330,21 @@ size_t OS::system_page_size()
  
  size_t OS::get_memory_locking_limit()
     {
 -#if defined(BOTAN_TARGET_OS_HAS_POSIX1) && defined(BOTAN_TARGET_OS_HAS_POSIX_MLOCK) && defined(RLIMIT_MEMLOCK)
-+#if defined(__sun)
++#if defined(BOTAN_TARGET_OS_IS_SOLARIS)
 +   priv_set_t *priv_set = priv_allocset();
 +   if (priv_set == nullptr)
 +     return 0;



Home | Main Index | Thread Index | Old Index