Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/www/trafficserver Fix NetBSD build



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1e5b75d205ce
branches:  trunk
changeset: 431556:1e5b75d205ce
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu May 14 18:59:47 2020 +0000

description:
Fix NetBSD build

diffstat:

 www/trafficserver/distinfo                                               |  14 +++-
 www/trafficserver/patches/patch-cmd_traffic__cop_traffic__cop.cc         |  13 ++++
 www/trafficserver/patches/patch-configure                                |  18 ++++-
 www/trafficserver/patches/patch-iocore_cache_CacheTest.cc                |  31 ++++++++++
 www/trafficserver/patches/patch-iocore_eventsystem_UnixEventProcessor.cc |  16 +++++
 www/trafficserver/patches/patch-lib_ts_ink__defs.h                       |  13 ++++
 www/trafficserver/patches/patch-mgmt_cluster_VMap.cc                     |  13 ++++
 www/trafficserver/patches/patch-mgmt_utils_MgmtUtils.cc                  |  13 ++++
 www/trafficserver/patches/patch-plugins_tcpinfo_tcpinfo.cc               |  13 ++++
 www/trafficserver/patches/patch-proxy_CoreUtils.cc                       |  22 +++++++
 www/trafficserver/patches/patch-proxy_CoreUtils.h                        |  13 ++++
 www/trafficserver/patches/patch-proxy_ICP.cc                             |  13 ++++
 12 files changed, 186 insertions(+), 6 deletions(-)

diffs (275 lines):

diff -r cae3440cea70 -r 1e5b75d205ce www/trafficserver/distinfo
--- a/www/trafficserver/distinfo        Thu May 14 18:59:15 2020 +0000
+++ b/www/trafficserver/distinfo        Thu May 14 18:59:47 2020 +0000
@@ -1,13 +1,23 @@
-$NetBSD: distinfo,v 1.3 2018/01/18 19:19:41 fhajny Exp $
+$NetBSD: distinfo,v 1.4 2020/05/14 18:59:47 joerg Exp $
 
 SHA1 (trafficserver-7.1.2.tar.bz2) = 4442890d1df6a6ae6e31e6bd4d86ce07f45b4173
 RMD160 (trafficserver-7.1.2.tar.bz2) = bd2181c8e3f42063c27cdf500f52d21f2cac0af7
 SHA512 (trafficserver-7.1.2.tar.bz2) = 5f7e7cf72c94bb2829f2ef0c7632c71feba5ec5eb76256548cfbdfc18bc6c8c88a7e7aeb5d90f990fd64e1a879e33cce312c702918a9fa1a8ca0fab8eee34305
 Size (trafficserver-7.1.2.tar.bz2) = 9040147 bytes
+SHA1 (patch-cmd_traffic__cop_traffic__cop.cc) = 8c6a3758223ae9fd51878fe0dbcaf63c933d1be6
 SHA1 (patch-cmd_traffic__wccp_wccp__client.cc) = 8acd84155a37bbc9aa83deb731b7ceb1a38db065
-SHA1 (patch-configure) = f603006f98a67c40c7df5958358c34e00c4edcb2
+SHA1 (patch-configure) = b900ff60b0d11ffaac5904de74cdb41ed8bede82
+SHA1 (patch-iocore_cache_CacheTest.cc) = d15b8020e7f3ea52d06ba4eae6ff267ae21ad9cd
+SHA1 (patch-iocore_eventsystem_UnixEventProcessor.cc) = 69288f45bc28fc34f5c9542634b30e95d18e9aa4
 SHA1 (patch-lib_ts_MemView.h) = 5d067b56a19bb5295a3877b7b05b543e1e599124
+SHA1 (patch-lib_ts_ink__defs.h) = 3f67c29732101976ecf0f49e998a5c8c442241f6
 SHA1 (patch-lib_wccp_wccp-test-router.cc) = 950014ed07186b4979eaf48f9f5d54441debe80b
+SHA1 (patch-mgmt_cluster_VMap.cc) = 167de593665025cfa350b7a5026171a9dc4d0427
+SHA1 (patch-mgmt_utils_MgmtUtils.cc) = e9902650ba1d180e3c9d8e173011bd7f86629fc5
+SHA1 (patch-plugins_tcpinfo_tcpinfo.cc) = 01ce3b46738b28b9e3d6e182260c95746a95e2fa
+SHA1 (patch-proxy_CoreUtils.cc) = 6c4df84ac808282fb7d3f056bd12886f97eb9f23
+SHA1 (patch-proxy_CoreUtils.h) = bc5cccb813922c9a116816a75bb63eeeb9e9e729
+SHA1 (patch-proxy_ICP.cc) = 64bc692c12bc3b30358202ae2fb96b3555d2e1ec
 SHA1 (patch-proxy_Makefile.in) = 00bc5c483107798054d46eb136e236a3e588963f
 SHA1 (patch-proxy_config_Makefile.in) = fc1fe7ae06db9147271bb4a2a422619f234f8f6d
 SHA1 (patch-rc_traffixserver.ml.in) = 1f0185ba67379aed11fd99e5696228a50063008d
diff -r cae3440cea70 -r 1e5b75d205ce www/trafficserver/patches/patch-cmd_traffic__cop_traffic__cop.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/trafficserver/patches/patch-cmd_traffic__cop_traffic__cop.cc  Thu May 14 18:59:47 2020 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-cmd_traffic__cop_traffic__cop.cc,v 1.1 2020/05/14 18:59:48 joerg Exp $
+
+--- cmd/traffic_cop/traffic_cop.cc.orig        2020-05-14 00:20:56.306834880 +0000
++++ cmd/traffic_cop/traffic_cop.cc
+@@ -1861,7 +1861,7 @@ main(int /* argc */, const char *argv[])
+   }
+ 
+   setsid(); // Important, thanks Vlad. :)
+-#if (defined(freebsd) && !defined(kfreebsd)) || defined(openbsd)
++#if (defined(freebsd) && !defined(kfreebsd)) || defined(openbsd) || defined(netbsd)
+   setpgrp(0, 0);
+ #else
+   setpgrp();
diff -r cae3440cea70 -r 1e5b75d205ce www/trafficserver/patches/patch-configure
--- a/www/trafficserver/patches/patch-configure Thu May 14 18:59:15 2020 +0000
+++ b/www/trafficserver/patches/patch-configure Thu May 14 18:59:47 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-configure,v 1.2 2018/01/18 19:19:41 fhajny Exp $
+$NetBSD: patch-configure,v 1.3 2020/05/14 18:59:48 joerg Exp $
 
 Portability.
 Fix incorrect docs build arg.
@@ -49,7 +49,17 @@
    BUILD_DOCS_TRUE=
    BUILD_DOCS_FALSE='#'
  else
-@@ -21352,7 +21352,7 @@ cat >>confdefs.h <<_ACEOF
+@@ -8121,6 +8121,9 @@ case $host_os in
+   openbsd*)
+     host_os_def="openbsd"
+     ;;
++  netbsd*)
++    host_os_def="netbsd"
++    ;;
+   solaris*)
+     host_os_def="solaris"
+     case "`isalist`" in
+@@ -21352,7 +21355,7 @@ cat >>confdefs.h <<_ACEOF
  _ACEOF
  
  
@@ -58,7 +68,7 @@
    as_fn_error $? "Cannot determine size of void*" "$LINENO" 5
  fi
  
-@@ -25058,7 +25058,7 @@ $as_echo "could not find ${TCL_BIN_DIR}/
+@@ -25058,7 +25061,7 @@ $as_echo "could not find ${TCL_BIN_DIR}/
  
  
  # expect tclConfig.sh to populate TCL_LIB_FLAG and TCL_INCLUDE_SPEC
@@ -67,7 +77,7 @@
      TCL_LIB_SPEC="-ltcl" # OSX fails to populate this variable
  fi
  LIBTCL=$TCL_LIB_SPEC
-@@ -26111,7 +26111,7 @@ if test "x$ac_cv_lib_cap_cap_set_proc" =
+@@ -26111,7 +26114,7 @@ if test "x$ac_cv_lib_cap_cap_set_proc" =
  
  else
  
diff -r cae3440cea70 -r 1e5b75d205ce www/trafficserver/patches/patch-iocore_cache_CacheTest.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/trafficserver/patches/patch-iocore_cache_CacheTest.cc Thu May 14 18:59:47 2020 +0000
@@ -0,0 +1,31 @@
+$NetBSD: patch-iocore_cache_CacheTest.cc,v 1.1 2020/05/14 18:59:48 joerg Exp $
+
+--- iocore/cache/CacheTest.cc.orig     2020-05-13 23:47:50.206492571 +0000
++++ iocore/cache/CacheTest.cc
+@@ -552,7 +552,7 @@ test_RamCache(RegressionTest *t, RamCach
+ 
+   for (int l = 0; l < 10; l++) {
+     for (int i = 0; i < 200; i++) {
+-      IOBufferData *d = THREAD_ALLOC(ioDataAllocator, this_thread());
++      IOBufferData *d = THREAD_ALLOC(ioDataAllocator, ::this_thread());
+       INK_MD5 md5;
+ 
+       d->alloc(BUFFER_SIZE_INDEX_16K);
+@@ -598,7 +598,7 @@ test_RamCache(RegressionTest *t, RamCach
+     md5.u64[1] = ((uint64_t)r[i] << 32) + r[i];
+     Ptr<IOBufferData> get_data;
+     if (!cache->get(&md5, &get_data)) {
+-      IOBufferData *d = THREAD_ALLOC(ioDataAllocator, this_thread());
++      IOBufferData *d = THREAD_ALLOC(ioDataAllocator, ::this_thread());
+       d->alloc(BUFFER_SIZE_INDEX_16K);
+       data.push_back(make_ptr(d));
+       cache->put(&md5, data.back().get(), 1 << 15);
+@@ -617,7 +617,7 @@ test_RamCache(RegressionTest *t, RamCach
+     md5.u64[1] = ((uint64_t)r[i] << 32) + r[i];
+     Ptr<IOBufferData> get_data;
+     if (!cache->get(&md5, &get_data)) {
+-      IOBufferData *d = THREAD_ALLOC(ioDataAllocator, this_thread());
++      IOBufferData *d = THREAD_ALLOC(ioDataAllocator, ::this_thread());
+       d->alloc(BUFFER_SIZE_INDEX_8K + (r[i] % 3));
+       data.push_back(make_ptr(d));
+       cache->put(&md5, data.back().get(), d->block_size());
diff -r cae3440cea70 -r 1e5b75d205ce www/trafficserver/patches/patch-iocore_eventsystem_UnixEventProcessor.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/trafficserver/patches/patch-iocore_eventsystem_UnixEventProcessor.cc  Thu May 14 18:59:47 2020 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-iocore_eventsystem_UnixEventProcessor.cc,v 1.1 2020/05/14 18:59:48 joerg Exp $
+
+--- iocore/eventsystem/UnixEventProcessor.cc.orig      2020-05-13 23:41:06.444229785 +0000
++++ iocore/eventsystem/UnixEventProcessor.cc
+@@ -32,6 +32,11 @@
+ #include "ts/ink_defs.h"
+ #include "ts/hugepages.h"
+ 
++#if defined(__NetBSD__) && !defined(PTHREAD_STACK_MIN)
++#include <machine/vmparam.h>
++#define PTHREAD_STACK_MIN (16 * PAGE_SIZE)
++#endif
++
+ EventType
+ EventProcessor::spawn_event_threads(int n_threads, const char *et_name, size_t stacksize)
+ {
diff -r cae3440cea70 -r 1e5b75d205ce www/trafficserver/patches/patch-lib_ts_ink__defs.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/trafficserver/patches/patch-lib_ts_ink__defs.h        Thu May 14 18:59:47 2020 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-lib_ts_ink__defs.h,v 1.1 2020/05/14 18:59:48 joerg Exp $
+
+--- lib/ts/ink_defs.h.orig     2020-05-13 23:49:19.084187831 +0000
++++ lib/ts/ink_defs.h
+@@ -62,7 +62,7 @@
+ #endif
+ #endif
+ 
+-#if defined(darwin)
++#if defined(darwin) || defined(__NetBSD__)
+ #define RENTRENT_GETHOSTBYNAME
+ #define RENTRENT_GETHOSTBYADDR
+ #endif
diff -r cae3440cea70 -r 1e5b75d205ce www/trafficserver/patches/patch-mgmt_cluster_VMap.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/trafficserver/patches/patch-mgmt_cluster_VMap.cc      Thu May 14 18:59:47 2020 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-mgmt_cluster_VMap.cc,v 1.1 2020/05/14 18:59:48 joerg Exp $
+
+--- mgmt/cluster/VMap.cc.orig  2020-05-13 23:51:51.524476341 +0000
++++ mgmt/cluster/VMap.cc
+@@ -143,7 +143,7 @@ VMap::VMap(char *interface, unsigned lon
+       ats_free(ifbuf);
+     }
+ 
+-    ifend = (struct ifreq *)(ifc.ifc_buf + ifc.ifc_len);
++    ifend = (struct ifreq *)((char *)ifc.ifc_buf + ifc.ifc_len);
+     // Loop through the list of interfaces
+     for (ifr = ifc.ifc_req; ifr < ifend;) {
+       if (ifr->ifr_addr.sa_family == AF_INET && strcmp(ifr->ifr_name, "lo0") != 0 &&
diff -r cae3440cea70 -r 1e5b75d205ce www/trafficserver/patches/patch-mgmt_utils_MgmtUtils.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/trafficserver/patches/patch-mgmt_utils_MgmtUtils.cc   Thu May 14 18:59:47 2020 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-mgmt_utils_MgmtUtils.cc,v 1.1 2020/05/14 18:59:48 joerg Exp $
+
+--- mgmt/utils/MgmtUtils.cc.orig       2020-05-13 23:52:41.074491810 +0000
++++ mgmt/utils/MgmtUtils.cc
+@@ -373,7 +373,7 @@ mgmt_getAddrForIntr(char *intrName, sock
+ 
+   found = false;
+   // Loop through the list of interfaces
+-  ifend = (struct ifreq *)(ifc.ifc_buf + ifc.ifc_len);
++  ifend = (struct ifreq *)((char *)ifc.ifc_buf + ifc.ifc_len);
+   for (ifr = ifc.ifc_req; ifr < ifend;) {
+     if (ifr->ifr_addr.sa_family == AF_INET && strcmp(ifr->ifr_name, intrName) == 0) {
+       // Get the address of the interface
diff -r cae3440cea70 -r 1e5b75d205ce www/trafficserver/patches/patch-plugins_tcpinfo_tcpinfo.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/trafficserver/patches/patch-plugins_tcpinfo_tcpinfo.cc        Thu May 14 18:59:47 2020 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-plugins_tcpinfo_tcpinfo.cc,v 1.1 2020/05/14 18:59:48 joerg Exp $
+
+--- plugins/tcpinfo/tcpinfo.cc.orig    2020-05-14 00:21:57.897681609 +0000
++++ plugins/tcpinfo/tcpinfo.cc
+@@ -134,7 +134,7 @@ log_tcp_info(Config *config, const char 
+   TSReturnCode ret;
+ 
+   if (config->log_level == 2) {
+-#if !defined(freebsd) || defined(__GLIBC__)
++#if (!defined(netbsd) && !defined(freebsd)) || defined(__GLIBC__)
+     ret = TSTextLogObjectWrite(config->log, "%s %s %s %u %u %u %u %u %u %u %u %u %u %u %u", event_name, client_str, server_str,
+                                info.tcpi_rtt, info.tcpi_rttvar, info.tcpi_last_data_sent, info.tcpi_last_data_recv,
+                                info.tcpi_snd_cwnd, info.tcpi_snd_ssthresh, info.tcpi_rcv_ssthresh, info.tcpi_unacked,
diff -r cae3440cea70 -r 1e5b75d205ce www/trafficserver/patches/patch-proxy_CoreUtils.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/trafficserver/patches/patch-proxy_CoreUtils.cc        Thu May 14 18:59:47 2020 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-proxy_CoreUtils.cc,v 1.1 2020/05/14 18:59:48 joerg Exp $
+
+--- proxy/CoreUtils.cc.orig    2020-05-14 00:03:49.823485692 +0000
++++ proxy/CoreUtils.cc
+@@ -98,7 +98,7 @@ int framepointer    = 0;
+ int program_counter = 0;
+ #endif // linux check
+ 
+-#if defined(darwin) || defined(freebsd) || defined(solaris) || defined(openbsd) // FIXME: solaris x86
++#if defined(darwin) || defined(freebsd) || defined(solaris) || defined(openbsd) || defined(__NetBSD__)// FIXME: solaris x86
+ // TODO: Cleanup multiple includes
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -738,7 +738,7 @@ CoreUtils::process_EThread(EThread *eth_
+     EThread *loaded_eth = (EThread *)buf;
+ 
+     printf("----------- EThread @ 0x%p ----------\n", eth_test);
+-#if !defined(kfreebsd) && (defined(freebsd) || defined(darwin) || defined(openbsd))
++#if !defined(kfreebsd) && (defined(freebsd) || defined(darwin) || defined(openbsd) || defined(__NetBSD__))
+     printf("   thread_id: %p\n", loaded_eth->tid);
+ #else
+     printf("   thread_id: %i\n", (int)loaded_eth->tid);
diff -r cae3440cea70 -r 1e5b75d205ce www/trafficserver/patches/patch-proxy_CoreUtils.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/trafficserver/patches/patch-proxy_CoreUtils.h Thu May 14 18:59:47 2020 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-proxy_CoreUtils.h,v 1.1 2020/05/14 18:59:48 joerg Exp $
+
+--- proxy/CoreUtils.h.orig     2020-05-14 00:03:04.489956140 +0000
++++ proxy/CoreUtils.h
+@@ -56,7 +56,7 @@ struct core_stack_state {
+ };
+ #endif // linux check
+ 
+-#if defined(darwin) || defined(freebsd) || defined(solaris) || defined(openbsd) // FIXME: solaris x86
++#if defined(darwin) || defined(freebsd) || defined(solaris) || defined(openbsd) || defined(__NetBSD__) // FIXME: solaris x86
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <stdlib.h>
diff -r cae3440cea70 -r 1e5b75d205ce www/trafficserver/patches/patch-proxy_ICP.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/trafficserver/patches/patch-proxy_ICP.cc      Thu May 14 18:59:47 2020 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-proxy_ICP.cc,v 1.1 2020/05/14 18:59:48 joerg Exp $
+
+--- proxy/ICP.cc.orig  2020-05-14 00:04:34.069526757 +0000
++++ proxy/ICP.cc
+@@ -1615,7 +1615,7 @@ ICPRequestCont::BuildICPMsg(ICPopcode_t 
+   mhdr->msg_name    = (caddr_t) nullptr;
+   mhdr->msg_namelen = 0;
+ // TODO: The following is just awkward
+-#if !defined(linux) && !defined(freebsd) && !defined(darwin) && !defined(solaris) && !defined(openbsd)
++#if !defined(linux) && !defined(freebsd) && !defined(darwin) && !defined(solaris) && !defined(openbsd) && !defined(__NetBSD__)
+   mhdr->msg_accrights    = (caddr_t)0;
+   mhdr->msg_accrightslen = 0;
+ #elif !defined(solaris)



Home | Main Index | Thread Index | Old Index