Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Dec 2025 09:28:26 +0000
From:      Matthias Andree <mandree@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 6261650dbda9 - main - dns/dnsmasq-devel: enable inotify support.
Message-ID:  <69466c3a.3cd6e.1264c25a@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by mandree:

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

commit 6261650dbda957a578910bf3ff3acf870bfed6a9
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2025-12-20 09:27:13 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2025-12-20 09:28:23 +0000

    dns/dnsmasq-devel: enable inotify support.
    
    Patch submitted upstream.
    
    I'll not enable this on the existing dns/dnsmasq port for now.
    
    Reported by:    Felix Hanley
    PR:             291624
---
 dns/dnsmasq-devel/Makefile            |  4 +++-
 dns/dnsmasq-devel/files/patch-inotify | 40 +++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/dns/dnsmasq-devel/Makefile b/dns/dnsmasq-devel/Makefile
index 06d297411326..a20c6f643af8 100644
--- a/dns/dnsmasq-devel/Makefile
+++ b/dns/dnsmasq-devel/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	dnsmasq
 DISTVERSION=	2.92rc3 # remember to bump PORTEPOCH when going from test to rc!
 # Leave the PORTREVISION in even if 0 to avoid accidental PORTEPOCH bumps:
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	7
 CATEGORIES=	dns
 MASTER_SITES=	LOCAL/mandree/ \
@@ -56,6 +56,8 @@ CPPFLAGS+=	-I${LOCALBASE}/include
 
 CONFLICTS_INSTALL=	dnsmasq-2*
 
+PATCH_STRIP=	-p1
+
 SUB_FILES=	pkg-message
 
 PORTDOCS=	CHANGELOG CHANGELOG.archive FAQ doc.html setup.html
diff --git a/dns/dnsmasq-devel/files/patch-inotify b/dns/dnsmasq-devel/files/patch-inotify
new file mode 100644
index 000000000000..c9175850667f
--- /dev/null
+++ b/dns/dnsmasq-devel/files/patch-inotify
@@ -0,0 +1,40 @@
+commit c1d456f4fbf1409b4aa61bbf4d358ddf616353e0
+Author: Matthias Andree <matthias.andree@gmx.de>
+Date:   Sat Dec 20 10:03:56 2025 +0100
+
+    Enable inotify support on FreeBSD 15.
+    
+    FreeBSD 15.0 has added Linux-compatible inotify support, so
+    enable it by looking if the version matches. Since FreeBSD inotify has
+    seen a few bug fixes in 2025H2, so only enable it if
+    __FreeBSD_version >= 1500068.  The latter can be checked through
+    osreldate.h or sys/param.h; the latter defines more macros that clash
+    with dnsmasq's, such as MIN and MAX, so use the former.
+
+diff --git a/src/config.h b/src/config.h
+index 0994f95..191c72e 100644
+--- a/src/config.h
++++ b/src/config.h
+@@ -142,7 +142,8 @@ HAVE_LOOP
+    include functionality to probe for and remove DNS forwarding loops.
+ 
+ HAVE_INOTIFY
+-   use the Linux inotify facility to efficiently re-read configuration files.
++   use the Linux and FreeBSD >= 15 inotify facility
++   to efficiently re-read configuration files.
+ 
+ NO_ID
+    Don't report *.bind CHAOS info to clients, forward such requests upstream instead.
+@@ -378,6 +379,12 @@ HAVE_SOCKADDR_SA_LEN
+ #if defined (HAVE_LINUX_NETWORK) && !defined(NO_INOTIFY)
+ #define HAVE_INOTIFY
+ #endif
++#if defined (__FreeBSD__) && __FreeBSD__ + 0 >= 15
++# include <osreldate.h>
++# if __FreeBSD_version >= 1500068 /* 15.0.0 */
++#  define HAVE_INOTIFY
++# endif
++#endif
+ 
+ /* This never compiles code, it's only used by the makefile to fingerprint builds. */
+ #ifdef DNSMASQ_COMPILE_FLAGS


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69466c3a.3cd6e.1264c25a>