[Bug 288342] devel/libinotify: breaks -pedantic on -CURRENT

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 20 Jul 2025 01:03:43 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288342

            Bug ID: 288342
           Summary: devel/libinotify: breaks -pedantic on -CURRENT
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: sunpoet@FreeBSD.org
          Reporter: jbeich@FreeBSD.org
                CC: arrowd@FreeBSD.org, markj@FreeBSD.org
             Flags: maintainer-feedback?(sunpoet@FreeBSD.org)
          Assignee: sunpoet@FreeBSD.org

Regressed by ports e8fe34cde858. Found via way-displays[1]. pkg-config from
other dependencies may add /usr/local/include via -I which, unlike -isystem[2],
doesn't hide warnings from consumers. GCC from ports doesn't remove[3] default
-isystem/usr/local/include, so not affected.

$ echo '#include <sys/inotify.h>'
$ cc -pedantic -Werror $(pkg-config --cflags libinotify pkg) -c a.c
In file included from a.c:1:
/usr/local/include/sys/inotify.h:21:13: error: zero size arrays are an
extension [-Werror,-Wzero-length-array]
   21 |         char            name[0];
      |                              ^
1 error generated.

or (simplified)

$ cc -pedantic -Werror -o/dev/null -c /usr/include/sys/inotify.h
/usr/include/sys/inotify.h:21:13: error: zero size arrays are an extension
[-Werror,-Wzero-length-array]
   21 |         char            name[0];
      |                              ^
1 error generated.

[1]
https://pkg-status.freebsd.org/beefy18/data/main-amd64-default/pa24f68e859d8_s78935fa40ee/logs/way-displays-1.14.1.log
[2] https://gcc.gnu.org/onlinedocs/cpp/System-Headers.html
[3] https://wiki.freebsd.org/WarnerLosh/UsrLocal

-- 
You are receiving this mail because:
You are the assignee for the bug.