From nobody Tue Jun 13 10:08:36 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QgPQX73rXz4cg8Q; Tue, 13 Jun 2023 10:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QgPQX6HSfz4cNM; Tue, 13 Jun 2023 10:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686650916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DScUcCXQtSIy7GJr4YXZ2A5dmuoampIRsJ78i230B/Y=; b=YvoIwfjKk3LsJMucWInaeBCMupO7en66mDlWF6w6Rdh8KsYYyVLaY7MN8Hy3Yw2D+NMMxE VMSiPb7cmjy8NKBf7HyUx8Rcqub77TLhof758kF+VotWSG3zcLEOTZxnRU//Q7FL+TEonk WA9ZCoTEcLkuV+OdKbIzQkYhwTgoLXfBWuxOXqHG7pYdpNlqIyEGLr83ZakaeshrQDeUiI JqFaosLxYpWziJK5wA/+QrLqeqpFZR2A0RtPhLhc7/nO51MG6uXIYatSJ86WuN/g565g81 WnZGhJc418S4BFhufP0DHCDDee2llUyvcphHmeY3phQwW8AITF+VquCOu6dScQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686650916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DScUcCXQtSIy7GJr4YXZ2A5dmuoampIRsJ78i230B/Y=; b=EnKKXMs+7tsuWoBAx8l03s573nYYE6L2jxSRAmiCU+qU8lZeXolmyd36GgbK9AS+mTA86x ZLdMl4tFzXCfo96YCDrqxip53nzCyvsDEi+AXd2ODIIBv8yQIbuO/vzQSSCKHPs1Z5e/XZ ZUUUTAvNt9VsTmxjD4eMApDFuh/swoDa0mCU+nmZl/WxwXfdFncA6bu5343b90XYlRyA80 rsEVS/bJey5k/2j1vLQdAs+HYRvF0r6qAqdGE87Lid4zg4Kctq4eHJTP5K4pxEs4O5c+7y tYWzTOAcVzooUyh/wkK+utYjXtFDGT7NT5pGjedbVt8RkH6qm4melzBiYzoeFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686650916; a=rsa-sha256; cv=none; b=rCHDa19XDiK51cpNf/ayzkZGlSi6GW1nrAMsC4Q2+U4ky6Sx0ztfoJaHHvrUPxEPCOuHza yq4pdXzdYRGXU+maEGEkhF4JNq10Nr3j6OXX3OYSWnYuTpNER88lU/s4fibXwZxPvvkgN0 r7h6Qy0D/GwjBoBlqJWJkgfR0TYx8v49TCkX+A9H+DXD7rD9VgqVwMDw78olN80V+COxIy NnxLcXrPf/FsV7kwlEXFhEWmBFjDrbENRNOjDfijKmU3JwPODwtyliBcfQovMVo7GCEplL 4oxuKUm0XKMdiqpGrAdKs4FALWBZsu53K5bkfgsDIeT7MUn+YvvRD0r7xwumPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QgPQX5Hr5zHv5; Tue, 13 Jun 2023 10:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35DA8aTM096134; Tue, 13 Jun 2023 10:08:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35DA8a3P096133; Tue, 13 Jun 2023 10:08:36 GMT (envelope-from git) Date: Tue, 13 Jun 2023 10:08:36 GMT Message-Id: <202306131008.35DA8a3P096133@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Eugene Grosbein Subject: git: 2cda71d98af0 - main - net/trafshow: unbreak for FreeBSD 14 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2cda71d98af01f78fb0da7acab2818ea6bed576e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by eugen: URL: https://cgit.FreeBSD.org/ports/commit/?id=2cda71d98af01f78fb0da7acab2818ea6bed576e commit 2cda71d98af01f78fb0da7acab2818ea6bed576e Author: Eugene Grosbein AuthorDate: 2023-06-13 10:05:07 +0000 Commit: Eugene Grosbein CommitDate: 2023-06-13 10:07:17 +0000 net/trafshow: unbreak for FreeBSD 14 Modern libpcap got its own pcap_init() function, so rename trafshow's private one to ts_pcap_init(). --- net/trafshow/files/patch-trafshow.c | 49 ++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/net/trafshow/files/patch-trafshow.c b/net/trafshow/files/patch-trafshow.c index a5a92eaf6118..9cb11dbec8d8 100644 --- a/net/trafshow/files/patch-trafshow.c +++ b/net/trafshow/files/patch-trafshow.c @@ -1,5 +1,5 @@ ---- trafshow.c.orig Wed Apr 12 00:10:18 2006 -+++ trafshow.c Wed Apr 12 00:12:49 2006 +--- trafshow.c.orig 2023-06-13 16:53:56.932059000 +0700 ++++ trafshow.c 2023-06-13 16:57:12.824618000 +0700 @@ -20,6 +20,7 @@ #endif #include @@ -8,7 +8,34 @@ #ifdef HAVE_PCAP_GET_SELECTABLE_FD #include #endif -@@ -307,6 +308,7 @@ +@@ -59,7 +60,7 @@ static pcap_if_t *pcap_matchdev(pcap_if_t *dp, const c + static void vers(); + static void usage(); + static pcap_if_t *pcap_matchdev(pcap_if_t *dp, const char *name); +-static int pcap_init(PCAP_HANDLER **ph_list, pcap_if_t *dp); ++static int ts_pcap_init(PCAP_HANDLER **ph_list, pcap_if_t *dp); + static void *pcap_feed(void *arg); /* PCAP_HANDLER *ph */ + #ifdef HAVE_PCAP_GET_SELECTABLE_FD + static void *pcap_feed2(void *arg); /* PCAP_HANDLER *ph */ +@@ -173,7 +174,7 @@ main(argc, argv) + } + + /* initialize list of pcap handlers */ +- if ((op = pcap_init(&ph_list, dev_list)) < 1) { ++ if ((op = ts_pcap_init(&ph_list, dev_list)) < 1) { + fprintf(stderr, "No packet capture device available (no permission?)\n"); + exit(1); + } +@@ -299,7 +300,7 @@ static int + } + + static int +-pcap_init(ph_list, dp) ++ts_pcap_init(ph_list, dp) + PCAP_HANDLER **ph_list; + pcap_if_t *dp; + { +@@ -308,6 +309,7 @@ pcap_init(ph_list, dp) const pcap_addr_t *ap; PCAP_HANDLER *ph, *ph_prev = 0; char *cp, buf[256]; @@ -16,16 +43,16 @@ if (!ph_list) return -1; -@@ -334,6 +336,12 @@ +@@ -339,6 +341,12 @@ pcap_init(ph_list, dp) + err++; + continue; } - if (pcap_setnonblock(pd, 1, buf) < 0) { - fprintf(stderr, "%s: %s\n", dp->name, buf); ++ if (ioctl(pcap_fileno(pd), BIOCIMMEDIATE, &v) < 0) { ++ fprintf(stderr, "%s: %s\n", dp->name, strerror(errno)); + pcap_close(pd); + err++; + continue; + } -+ if (ioctl(pcap_fileno(pd), BIOCIMMEDIATE, &v) < 0) { -+ fprintf(stderr, "%s: %s\n", dp->name, strerror(errno)); - pcap_close(pd); - err++; - continue; + if ((ph = (PCAP_HANDLER *)malloc(sizeof(PCAP_HANDLER))) == 0) { + perror("malloc"); + exit(1);