From nobody Sun Mar 15 05:37:50 2026 X-Original-To: dev-commits-src-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 4fYRnq4VQ1z6V818 for ; Sun, 15 Mar 2026 05:37:51 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fYRnp3dF3z4J01 for ; Sun, 15 Mar 2026 05:37:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1773553071; 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=Cb687AUz0riuoh/5y3GdP1wD1tQpfy8g3IXEDHxRsSw=; b=qQunS25RhUpD8U8O2mRYghvpX49mcHtJyB7pBaSe55wYbfZFZPFngyulAhtbQgSFm1nIMK rWaU3lW3pGDt53Q8/R8U05wdoPvGvOe3mbai6eLXCSqbOLlHf37urwsKBvZJ6zzlqYaPDj uOSr+COuHhmOg7/lr7KOGzQDEpfjRn9nQBD3doQlhsExty2Zi1bDwp57dtFDJZwi+8fkuG zTyExBoZN2l8jyq58oNC4JrVcD6lqPg5kEmI1c9ruQlHM4h6Q3ykivwzUnsuTyCTxRs7U6 aUUwc09ZbVLNC1w4qkAuPDueIkZYoymcIYitlAni6THyxouOeZ7g48nHGaK9Hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1773553070; a=rsa-sha256; cv=none; b=bNUMDBO/3cs1uC1BPhfgxkT72zrpLpfZESfIzSV5R4cKzk+bm2N2OqMqoy7MDuUbwHKgI6 w97Q20vvxmaG7HM5ek2MlXoj1vX4jlefePeoZXIui81K6adoF2ZXaqzpuEhdABdntYRL/s tFqq11AfnLlZwRmy5P8jwEFEXyTe2ToQ9/GqPoUoEvtTC8NxVVop8WWFy7vCCe1mErHWfL OhBycjYFThTs0oRr65zH7UizADkzlg84Lwc5ZRB+HoCYh1RSTxPRN+AdjslD0cx9K6Fa9J bEEerEK129vYNYtpaPZ71JjpHXE4hq5iKmfGSBGC3ZILkZu5S8u3yR01hwGmpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1773553070; 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=Cb687AUz0riuoh/5y3GdP1wD1tQpfy8g3IXEDHxRsSw=; b=pY9+YoQkkwso2xdh6ZOmG5LCVT178d+9+KkoxcxB4LNPutBQDm2gNkxqRO7NBL2B3fn6jx NRibJ8YrycFDz1REU0o0iJnYWhVFzRshniD4JEHIQdY9O5eiBdG445ye/uuE3pkQU+WYTm PFMvcNOggIaWHBxtBWAVALJSGH9T0lUQKVkuUqOjxL92HwpVw9uIYvT0+GChAfJfr4Yzn2 5lz+6lkT8GsNliCrtVS8ZhZ9tooJixrNc/OL0XCLVWVa7wKbbo1G62LgypZO+Cow4FBnFD OdhR967FY0TLURSdG6Zxzq3a5nqCij5fx3ZSvlVehy7oKBfrEwW85yyTf19xfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fYRnp2xNwzc2w for ; Sun, 15 Mar 2026 05:37:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e97a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 15 Mar 2026 05:37:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joseph Mingrone Subject: git: a0b3ef195260 - main - ipfwpcap: Fix build after libpcap 1.10.6 update List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a0b3ef1952603ebf0307ca723b03e5a71598dd5a Auto-Submitted: auto-generated Date: Sun, 15 Mar 2026 05:37:50 +0000 Message-Id: <69b645ae.1e97a.46de4c5f@gitrepo.freebsd.org> The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=a0b3ef1952603ebf0307ca723b03e5a71598dd5a commit a0b3ef1952603ebf0307ca723b03e5a71598dd5a Author: Joseph Mingrone AuthorDate: 2026-03-15 05:32:01 +0000 Commit: Joseph Mingrone CommitDate: 2026-03-15 05:32:01 +0000 ipfwpcap: Fix build after libpcap 1.10.6 update pcap-int.h now references SIZEOF_TIME_T from libpcap's config.h, which is not available to consumers of the internal header outside of the libpcap build. Switch to the public header and replace the direct FILE* casts and ferror()/fflush() calls with pcap_dump_flush(3), which is the correct public API for flushing a pcap dump file. Sponsored by: The FreeBSD Foundation --- usr.sbin/ipfwpcap/ipfwpcap.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/usr.sbin/ipfwpcap/ipfwpcap.c b/usr.sbin/ipfwpcap/ipfwpcap.c index a9cead99bd07..2032387aaa0b 100644 --- a/usr.sbin/ipfwpcap/ipfwpcap.c +++ b/usr.sbin/ipfwpcap/ipfwpcap.c @@ -41,11 +41,7 @@ #include -/* XXX normally defined in config.h */ -#define HAVE_STRLCPY 1 -#define HAVE_SNPRINTF 1 -#define HAVE_VSNPRINTF 1 -#include /* see pcap(3) and /usr/src/contrib/libpcap/. */ +#include #ifdef IP_MAXPACKET #define BUFMAX IP_MAXPACKET @@ -295,8 +291,7 @@ if (debug) fprintf(stderr, " sendto(%d) = %d\n", sd, r); (void) gettimeofday(&(phd.ts), NULL); phd.caplen = phd.len = nr; pcap_dump((u_char *)dp, &phd, buf); - if (ferror((FILE *)dp)) { perror(dumpf); quit(14); } - (void) fflush((FILE *)dp); + if (pcap_dump_flush(dp) == -1) { pcap_perror(p, dumpf); quit(14); } } quit(0);