Re: git: cf7638ce9d71 - main - devel/libev: Unbreak current after inotify add

From: Dima Panov <fluffy_at_FreeBSD.org>
Date: Sat, 12 Jul 2025 13:29:43 UTC
Hello!

Better way is guard it with #ifdef's for portability and possible upstreaming


diff --git a/devel/libev/files/patch-ev.c b/devel/libev/files/patch-ev.c
index 65b372e541..bcc4cf2869 100644
--- a/devel/libev/files/patch-ev.c
+++ b/devel/libev/files/patch-ev.c
@@ -1,15 +1,18 @@
  --- ev.c.orig  2020-03-18 12:27:32 UTC
  +++ ev.c
-@@ -507,7 +507,7 @@
+@@ -507,7 +507,11 @@
   #endif

   #if EV_USE_INOTIFY
--# include <sys/statfs.h>
++# ifdef __FreeBSD__
  +# include <sys/mount.h>
++# else
+ # include <sys/statfs.h>
++# endif
   # include <sys/inotify.h>
   /* some very old inotify.h headers don't have IN_DONT_FOLLOW */
   # ifndef IN_DONT_FOLLOW
-@@ -3149,7 +3149,7 @@ ev_recommended_backends (void) EV_NOEXCEPT
+@@ -3149,7 +3153,7 @@ ev_recommended_backends (void) EV_NOEXCEPT
   {
     unsigned int flags = ev_supported_backends ();



On 12.07.2025 13:20, Nuno Teixeira wrote:
> The branch main has been updated by eduardo:
> 
> URL: https://cgit.FreeBSD.org/ports/commit/?id=cf7638ce9d71b857f12bdc87b768cc2466d849d4
> 
> commit cf7638ce9d71b857f12bdc87b768cc2466d849d4
> Author:     Nuno Teixeira <eduardo@FreeBSD.org>
> AuthorDate: 2025-07-12 10:05:38 +0000
> Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
> CommitDate: 2025-07-12 10:19:24 +0000
> 
>      devel/libev: Unbreak current after inotify add
>      
>      After inotify was added to main, if condition bellow leads to build error
>      related to missing (linux) statfs.h header.
>      
>      Fix it by adjusting correct headers:
>      
>       #if EV_USE_INOTIFY
>      -# include <sys/statfs.h>
>      +# include <sys/mount.h>
>       # include <sys/inotify.h>
>      
>      While here, refresh patches.
>      
>      Approved by:    portmgr (blanket, build fix)
>      Sugested by:    markj
>      See also;       https://lists.freebsd.org/archives/dev-commits-src-all/2025-July/057269.html
> ---
>   devel/libev/files/patch-Makefile.in |  4 ++--
>   devel/libev/files/patch-configure   |  4 ++--
>   devel/libev/files/patch-ev.c        | 13 +++++++++++--
>   3 files changed, 15 insertions(+), 6 deletions(-)
> 
> diff --git a/devel/libev/files/patch-Makefile.in b/devel/libev/files/patch-Makefile.in
> index 5f6ab0fc3b55..509149e2548b 100644
> --- a/devel/libev/files/patch-Makefile.in
> +++ b/devel/libev/files/patch-Makefile.in
> @@ -1,6 +1,6 @@
> ---- Makefile.in.orig	2015-12-20 21:12:45 UTC
> +--- Makefile.in.orig	2020-03-18 12:27:30 UTC
>   +++ Makefile.in
> -@@ -343,7 +343,7 @@ EXTRA_DIST = LICENSE Changes libev.m4 au
> +@@ -357,7 +357,7 @@ man_MANS = ev.3
>    	     ev.3 ev.pod Symbols.ev Symbols.event
>    
>    man_MANS = ev.3
> diff --git a/devel/libev/files/patch-configure b/devel/libev/files/patch-configure
> index c92f6cf66003..6e5bf586cf34 100644
> --- a/devel/libev/files/patch-configure
> +++ b/devel/libev/files/patch-configure
> @@ -1,6 +1,6 @@
> ---- configure.orig	2015-12-20 21:12:45 UTC
> +--- configure.orig	2020-03-18 12:27:26 UTC
>   +++ configure
> -@@ -3879,14 +3879,6 @@ else
> +@@ -3954,14 +3954,6 @@ fi
>    fi
>    
>    
> diff --git a/devel/libev/files/patch-ev.c b/devel/libev/files/patch-ev.c
> index 28a00f3aaf8b..65b372e5415a 100644
> --- a/devel/libev/files/patch-ev.c
> +++ b/devel/libev/files/patch-ev.c
> @@ -1,6 +1,15 @@
> ---- ev.c.orig	2015-12-20 21:12:53 UTC
> +--- ev.c.orig	2020-03-18 12:27:32 UTC
>   +++ ev.c
> -@@ -2736,7 +2736,7 @@ ev_recommended_backends (void) EV_THROW
> +@@ -507,7 +507,7 @@
> + #endif
> +
> + #if EV_USE_INOTIFY
> +-# include <sys/statfs.h>
> ++# include <sys/mount.h>
> + # include <sys/inotify.h>
> + /* some very old inotify.h headers don't have IN_DONT_FOLLOW */
> + # ifndef IN_DONT_FOLLOW
> +@@ -3149,7 +3149,7 @@ ev_recommended_backends (void) EV_NOEXCEPT
>    {
>      unsigned int flags = ev_supported_backends ();
>    

-- 
Sincerely,
Dima (fluffy@FreeBSD.org, https://t.me/FluffyBSD, @fluffy:matrix-dev.freebsd.org)
(desktop, kde, x11, office, ports-secteam)@FreeBSD team