pkgsrc-Changes-HG archive

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

[pkgsrc/pkgsrc-2021Q4]: pkgsrc/net/bind916 Pullup ticket #6586 - requested by...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ebc99f2bd637
branches:  pkgsrc-2021Q4
changeset: 374933:ebc99f2bd637
user:      bsiegert <bsiegert%pkgsrc.org@localhost>
date:      Thu Mar 03 18:51:38 2022 +0000

description:
Pullup ticket #6586 - requested by gutteridge
net/bind916: SunOS build fix

Revisions pulled up:
- net/bind916/distinfo                                          1.31
- net/bind916/patches/patch-lib_isc_unix_socket.c               1.7

---
   Module Name:    pkgsrc
   Committed By:   gutteridge
   Date:           Thu Feb 17 15:37:26 UTC 2022

   Modified Files:
           pkgsrc/net/bind916: distinfo
           pkgsrc/net/bind916/patches: patch-lib_isc_unix_socket.c

   Log Message:
   bind916: fix builds on Solaris derivates

   A patch fixing SunOS builds was lost during a recent update, restore
   it. (And s/SmartOS/SunOS/ in comment, this doesn't just affect SmartOS,
   reproduced and fixed on OmniOS. This package also fails to build on
   Linux, but that's another issue entirely.) Addresses PR pkg/56716 from
   Russell Hansen.

diffstat:

 net/bind916/distinfo                            |   4 +-
 net/bind916/patches/patch-lib_isc_unix_socket.c |  56 ++++++++++++++++--------
 2 files changed, 38 insertions(+), 22 deletions(-)

diffs (190 lines):

diff -r b7d5302f8496 -r ebc99f2bd637 net/bind916/distinfo
--- a/net/bind916/distinfo      Wed Feb 23 09:51:55 2022 +0000
+++ b/net/bind916/distinfo      Thu Mar 03 18:51:38 2022 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.29 2021/12/15 14:18:32 he Exp $
+$NetBSD: distinfo,v 1.29.2.1 2022/03/03 18:51:38 bsiegert Exp $
 
 BLAKE2s (bind-9.16.24.tar.xz) = b8a19bfbbc8a4c0beafa6fa98f879fbcda800bfa7b10e8eb391e0d0d889cefad
 SHA512 (bind-9.16.24.tar.xz) = a982bcad8c517dbcb81e768486e1a8b92e495efcf45c4961170c3bc7fac837903605dcd05cfb9b9e1074599b90be1b9c3dbca4162ede0a32fe4c3405ad92816b
@@ -48,7 +48,7 @@
 SHA1 (patch-lib_isc_timer.c) = aea2019bbf3d84cad77af432a2bbdf0da8f2f893
 SHA1 (patch-lib_isc_unix_include_isc_stdatomic.h) = b73b0224be47c1733f6346fce9243e97f54e1865
 SHA1 (patch-lib_isc_unix_net.c) = c654f60a1feefdba9bf980dcfa46ce37f46918aa
-SHA1 (patch-lib_isc_unix_socket.c) = 7d5b61124187009ce03f4fc963f8ad3c44d267d0
+SHA1 (patch-lib_isc_unix_socket.c) = c6d04164dfc2047493b39c174bbdf2c8aa59bc1d
 SHA1 (patch-lib_isc_unix_time.c) = fac9e66754e099f53ba8c499f5f179825a0b0fbd
 SHA1 (patch-lib_ns_Makefile.in) = 7375d0cb44c891492594dc7540f78826c141106a
 SHA1 (patch-lib_ns_client.c) = 099ca607278d064081a0cfc92d96f0b31d95a944
diff -r b7d5302f8496 -r ebc99f2bd637 net/bind916/patches/patch-lib_isc_unix_socket.c
--- a/net/bind916/patches/patch-lib_isc_unix_socket.c   Wed Feb 23 09:51:55 2022 +0000
+++ b/net/bind916/patches/patch-lib_isc_unix_socket.c   Thu Mar 03 18:51:38 2022 +0000
@@ -1,12 +1,28 @@
-$NetBSD: patch-lib_isc_unix_socket.c,v 1.6 2021/10/24 06:40:28 taca Exp $
+$NetBSD: patch-lib_isc_unix_socket.c,v 1.6.2.1 2022/03/03 18:51:38 bsiegert Exp $
 
 * Apply fixes from NetBSD base system.
-* Fix build on SmartOS. In this special case, _XOPEN_SOURCE has to be only
-  defined on SmartOS.
+* Fix build on SunOS. In this special case, _XOPEN_SOURCE has to be only
+  defined on SunOS.
 
---- lib/isc/unix/socket.c.orig 2021-09-07 09:37:05.000000000 +0000
+--- lib/isc/unix/socket.c.orig 2022-01-12 13:50:10.000000000 +0000
 +++ lib/isc/unix/socket.c
-@@ -360,6 +360,10 @@ struct isc_socket {
+@@ -13,6 +13,15 @@
+ 
+ /*! \file */
+ 
++/* needed for CMSG_DATA */
++#if defined(__sun)
++#if (__STDC_VERSION__ - 0 < 199901L)
++#define _XOPEN_SOURCE 500
++#else
++#define _XOPEN_SOURCE 600
++#endif
++#endif
++
+ #include <inttypes.h>
+ #include <stdbool.h>
+ #include <sys/param.h>
+@@ -362,6 +371,10 @@ struct isc_socket {
        unsigned char overflow; /* used for MSG_TRUNC fake */
  #endif                                /* ifdef ISC_PLATFORM_RECVOVERFLOW */
  
@@ -17,7 +33,7 @@
        unsigned int dscp;
  };
  
-@@ -469,6 +473,14 @@ static bool
+@@ -471,6 +484,14 @@ static bool
  process_ctlfd(isc__socketthread_t *thread);
  static void
  setdscp(isc_socket_t *sock, isc_dscp_t dscp);
@@ -32,7 +48,7 @@
  
  #define SELECT_POKE_SHUTDOWN (-1)
  #define SELECT_POKE_NOTHING  (-2)
-@@ -1573,6 +1585,7 @@ doio_recv(isc_socket_t *sock, isc_socket
+@@ -1574,6 +1595,7 @@ doio_recv(isc_socket_t *sock, isc_socket
        case isc_sockettype_udp:
        case isc_sockettype_raw:
                break;
@@ -40,7 +56,7 @@
        default:
                INSIST(0);
                ISC_UNREACHABLE();
-@@ -1781,9 +1794,26 @@ socketclose(isc__socketthread_t *thread,
+@@ -1782,9 +1804,26 @@ socketclose(isc__socketthread_t *thread,
         */
        LOCK(&thread->fdlock[lockid]);
        thread->fds[fd] = NULL;
@@ -68,7 +84,7 @@
  
        inc_stats(thread->manager->stats, sock->statsindex[STATID_CLOSE]);
  
-@@ -2190,6 +2220,13 @@ again:
+@@ -2191,6 +2230,13 @@ again:
                        }
  #endif /* if defined(PF_ROUTE) */
                        break;
@@ -82,7 +98,7 @@
                }
        } else {
                sock->fd = dup(dup_socket->fd);
-@@ -2439,6 +2476,7 @@ socket_create(isc_socketmgr_t *manager, 
+@@ -2440,6 +2486,7 @@ socket_create(isc_socketmgr_t *manager,
  
        REQUIRE(VALID_MANAGER(manager));
        REQUIRE(socketp != NULL && *socketp == NULL);
@@ -90,7 +106,7 @@
  
        result = allocate_socket(manager, type, &sock);
        if (result != ISC_R_SUCCESS) {
-@@ -2553,6 +2591,7 @@ isc_socket_open(isc_socket_t *sock) {
+@@ -2554,6 +2601,7 @@ isc_socket_open(isc_socket_t *sock) {
        REQUIRE(isc_refcount_current(&sock->references) >= 1);
        REQUIRE(sock->fd == -1);
        REQUIRE(sock->threadid == -1);
@@ -98,7 +114,7 @@
  
        result = opensocket(sock->manager, sock, NULL);
  
-@@ -2631,6 +2670,7 @@ isc_socket_close(isc_socket_t *sock) {
+@@ -2632,6 +2680,7 @@ isc_socket_close(isc_socket_t *sock) {
  
        LOCK(&sock->lock);
  
@@ -106,7 +122,7 @@
        REQUIRE(sock->fd >= 0 && sock->fd < (int)sock->manager->maxsocks);
  
        INSIST(!sock->connecting);
-@@ -2661,6 +2701,24 @@ isc_socket_close(isc_socket_t *sock) {
+@@ -2662,6 +2711,24 @@ isc_socket_close(isc_socket_t *sock) {
        return (ISC_R_SUCCESS);
  }
  
@@ -131,7 +147,7 @@
  /*
   * Dequeue an item off the given socket's read queue, set the result code
   * in the done event to the one provided, and send it to the task it was
-@@ -3101,6 +3159,58 @@ finish:
+@@ -3102,6 +3169,58 @@ finish:
        }
  }
  
@@ -190,7 +206,7 @@
  /*
   * Process read/writes on each fd here.  Avoid locking
   * and unlocking twice if both reads and writes are possible.
-@@ -3148,7 +3258,7 @@ process_fd(isc__socketthread_t *thread, 
+@@ -3149,7 +3268,7 @@ process_fd(isc__socketthread_t *thread,
                if (sock->connecting) {
                        internal_connect(sock);
                } else {
@@ -199,7 +215,7 @@
                }
        }
  
-@@ -3156,7 +3266,7 @@ process_fd(isc__socketthread_t *thread, 
+@@ -3157,7 +3276,7 @@ process_fd(isc__socketthread_t *thread,
                if (sock->listener) {
                        internal_accept(sock); /* unlocks sock */
                } else {
@@ -208,7 +224,7 @@
                        UNLOCK(&sock->lock);
                }
        } else {
-@@ -3797,7 +3907,7 @@ isc_socketmgr_create2(isc_mem_t *mctx, i
+@@ -3798,7 +3917,7 @@ isc_socketmgr_create2(isc_mem_t *mctx, i
                isc_thread_create(netthread, &manager->threads[i],
                                  &manager->threads[i].thread);
                char tname[1024];
@@ -217,7 +233,7 @@
                isc_thread_setname(manager->threads[i].thread, tname);
        }
  
-@@ -5218,7 +5328,7 @@ static isc_once_t hasreuseport_once = IS
+@@ -5219,7 +5338,7 @@ static isc_once_t hasreuseport_once = IS
  static bool hasreuseport = false;
  
  static void
@@ -226,7 +242,7 @@
  /*
   * SO_REUSEPORT works very differently on *BSD and on Linux (because why not).
   * We only want to use it on Linux, if it's available. On BSD we want to dup()
-@@ -5272,6 +5382,8 @@ _socktype(isc_sockettype_t type) {
+@@ -5273,6 +5392,8 @@ _socktype(isc_sockettype_t type) {
                return ("tcp");
        case isc_sockettype_unix:
                return ("unix");
@@ -235,7 +251,7 @@
        default:
                return ("not-initialized");
        }
-@@ -5502,3 +5614,113 @@ error:
+@@ -5503,3 +5624,113 @@ error:
        return (result);
  }
  #endif /* HAVE_JSON_C */



Home | Main Index | Thread Index | Old Index