Blame wxGTK-configure-c99.patch

817512
Include <sys/inotify.h> in the inotify_init probe, to avoid
817512
an implicit function declaration.  Future compilers are likely
817512
to reject implicit function declarations by default, making
817512
the configure check invalid as written.
817512
817512
Fixed upstream via:
817512
817512
commit da4b42688a6cd5444eefb91bf40183d88203ffca
817512
Author: Mojca Miklavec <mojca@macports.org>
817512
Date:   Sat Nov 5 13:22:25 2022 +0100
817512
817512
    Fix implicit declaration configuration errors with Xcode 12
817512
    
817512
    Some configure could fail with errors like the following:
817512
    
817512
    conftest.c:56:33: error: implicitly declaring library function 'exit'
817512
    with type 'void (int) __attribute__((noreturn))'
817512
    [-Werror,-Wimplicit-function-declaration]
817512
    
817512
    See https://trac.macports.org/ticket/61672
817512
    
817512
    Closes #22946.
817512
817512
817512
diff --git a/configure b/configure
817512
index 54eb7a74f95d4dd2..232d202cc5da2345 100755
817512
--- a/configure
817512
+++ b/configure
817512
@@ -37928,7 +37916,9 @@ if ${wx_cv_inotify_usable+:} false; then :
817512
 else
817512
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
817512
 /* end confdefs.h.  */
817512
-int main() { return inotify_init(); }
817512
+
817512
+		    #include <sys/inotify.h>
817512
+		    int main() { return inotify_init(); }
817512
 _ACEOF
817512
 if ac_fn_c_try_link "$LINENO"; then :
817512
   wx_cv_inotify_usable=yes
817512
diff --git a/configure.in b/configure.in
817512
index c76c528f6635bece..bf6a33b3c10dc27a 100644
817512
--- a/configure.in
817512
+++ b/configure.in
817512
@@ -5622,7 +5622,9 @@ if test "$wxUSE_FSWATCHER" = "yes"; then
817512
                 [whether inotify is usable],
817512
                 wx_cv_inotify_usable,
817512
                 AC_LINK_IFELSE(
817512
-                    [AC_LANG_SOURCE([int main() { return inotify_init(); }])],
817512
+                    [AC_LANG_SOURCE([
817512
+		    #include <sys/inotify.h>
817512
+		    int main() { return inotify_init(); }])],
817512
                     [wx_cv_inotify_usable=yes],
817512
                     [wx_cv_inotify_usable=no]
817512
                 )