git: d486abf6f008 - 2026Q1 - multimedia/v4l-utils: Fix build on CURRENT/STABLE

From: Jason E. Hale <jhale_at_FreeBSD.org>
Date: Tue, 27 Jan 2026 14:13:55 UTC
The branch 2026Q1 has been updated by jhale:

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

commit d486abf6f00867aed73b03225433f265cfb84d75
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2026-01-27 13:49:44 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2026-01-27 14:13:48 +0000

    multimedia/v4l-utils: Fix build on CURRENT/STABLE
    
    In file included from dvbv5-daemon.c:43:
    /usr/include/search.h:80:7: error: expected identifier or '('
       80 | void     tdestroy(void *, void (*)(void *));
          |          ^
    dvbv5-daemon.c:24:23: note: expanded from macro 'tdestroy'
       24 | #define tdestroy(...) do {} while (0)
          |                       ^
    In file included from dvbv5-daemon.c:43:
    /usr/include/search.h:80:7: error: while loop outside of a function
    dvbv5-daemon.c:24:29: note: expanded from macro 'tdestroy'
       24 | #define tdestroy(...) do {} while (0)
          |                             ^
    
    Use native tdestroy(3) on 16-CURRENT and 15-STABLE after [1] and [2],
    respectively.
    
    [1] https://cgit.freebsd.org/src/commit/?id=b8c99e7d912f0dad84cec80f8c4331646b87a3ec
    [2] https://cgit.freebsd.org/src/commit/?h=stable/15&id=6197518ee90541a5e04d03dffda760b888d3a3e7
    
    Reported by:    pkg-fallout
    MFH:            2026Q1
    
    (cherry picked from commit c694950c1722d69f69965d0956ad964a597232c7)
---
 multimedia/libv4l/files/patch-utils_dvb_dvbv5-daemon.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/multimedia/libv4l/files/patch-utils_dvb_dvbv5-daemon.c b/multimedia/libv4l/files/patch-utils_dvb_dvbv5-daemon.c
index 9ea323aeb099..1f0c80755735 100644
--- a/multimedia/libv4l/files/patch-utils_dvb_dvbv5-daemon.c
+++ b/multimedia/libv4l/files/patch-utils_dvb_dvbv5-daemon.c
@@ -1,13 +1,17 @@
---- utils/dvb/dvbv5-daemon.c.orig	2020-04-09 16:29:54 UTC
+--- utils/dvb/dvbv5-daemon.c.orig	2022-01-10 11:49:59 UTC
 +++ utils/dvb/dvbv5-daemon.c
-@@ -18,7 +18,11 @@
+@@ -18,7 +18,14 @@
   *
   */
  
-+#ifndef __FreeBSD__
- #define _XOPEN_SOURCE 600
+-#define _XOPEN_SOURCE 600
++#ifdef __FreeBSD__
++#  include <sys/param.h>
++#  if __FreeBSD_version < 1500505 || (__FreeBSD_version >= 1600000 && __FreeBSD_version < 1600008)
++#    define tdestroy(...) do {} while (0)
++#  endif
 +#else
-+#define	tdestroy(...) do {} while (0)
++#  define _XOPEN_SOURCE 600
 +#endif
  
  #define _FILE_OFFSET_BITS 64