git: b5c1ed98827f - main - net/xprobe: Fix build with Clang 16+

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 31 Jul 2023 16:45:47 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b5c1ed98827f5cb9bbf1bc2d4c8fccc93c0ec538

commit b5c1ed98827f5cb9bbf1bc2d4c8fccc93c0ec538
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-07-31 16:30:26 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-07-31 16:39:51 +0000

    net/xprobe: Fix build with Clang 16+
    
    misc.cc:21:3: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
      register long sum;            /* assumes long == 32 bits */
      ^~~~~~~~~
    misc.cc:23:3: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
      register u_short answer;      /* assumes u_short == 16 bits */
      ^~~~~~~~~
    2 errors generated.
---
 net/xprobe/files/patch-libs-external_USI++_src_misc.cc | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/net/xprobe/files/patch-libs-external_USI++_src_misc.cc b/net/xprobe/files/patch-libs-external_USI++_src_misc.cc
index d66982ee3eda..259786c18b4e 100644
--- a/net/xprobe/files/patch-libs-external_USI++_src_misc.cc
+++ b/net/xprobe/files/patch-libs-external_USI++_src_misc.cc
@@ -8,3 +8,15 @@
  #include <unistd.h>
  #include <sys/ioctl.h>
  #include <errno.h>
+@@ -17,9 +18,9 @@ unsigned short
+ in_cksum (unsigned short *ptr, int nbytes, bool may_pad)
+ {
+ 
+-  register long sum;		/* assumes long == 32 bits */
++  long sum;		/* assumes long == 32 bits */
+   u_short oddbyte;
+-  register u_short answer;	/* assumes u_short == 16 bits */
++  u_short answer;	/* assumes u_short == 16 bits */
+ 
+ 
+   /* For psuedo-headers: odd len's require