]> git.pld-linux.org Git - packages/collectd.git/commit
hack for mount.h conflict between linux and glibc headers
authorJan Palus <atler@pld-linux.org>
Tue, 23 Aug 2022 11:18:59 +0000 (13:18 +0200)
committerJan Palus <atler@pld-linux.org>
Tue, 23 Aug 2022 11:18:59 +0000 (13:18 +0200)
commitd85164410935e58bd31aa690321d7bbc60760363
tree80e9c223ff4241123bb2527f4b951c155934ae86
parentdc36bc31fc454488e2eb6627c0b7e106e820ab92
hack for mount.h conflict between linux and glibc headers

glibc 2.36 introduced new symbols to <sys/mount.h> that conflict with
<linux/mount.h> resulting in failure when both are included:

In file included from /usr/include/linux/fs.h:19,
                 from /usr/include/xfs/linux.h:36,
                 from /usr/include/xfs/xfs.h:9,
                 from /usr/include/xfs/xqm.h:9,
                 from src/utils/mount/mount.c:34:
/usr/include/linux/mount.h:95:6: error: redeclaration of 'enum fsconfig_command'
   95 | enum fsconfig_command {
      |      ^~~~~~~~~~~~~~~~
In file included from ./src/utils/mount/mount.h:57,
                 from src/utils/mount/mount.c:31:
/usr/include/sys/mount.h:189:6: note: originally defined here
  189 | enum fsconfig_command
      |      ^~~~~~~~~~~~~~~~
/usr/include/linux/mount.h:96:9: error: redeclaration of enumerator 'FSCONFIG_SET_FLAG'
   96 |         FSCONFIG_SET_FLAG       = 0,    /* Set parameter, supplying no value */
      |         ^~~~~~~~~~~~~~~~~
/usr/include/sys/mount.h:191:3: note: previous definition of 'FSCONFIG_SET_FLAG' with type 'enum fsconfig_command'
  191 |   FSCONFIG_SET_FLAG       = 0,    /* Set parameter, supplying no value */
      |   ^~~~~~~~~~~~~~~~~
...

since <linux/mount.h> is included transitively try not to include
<sys/mount.h> if glibc >= 2.36 is detected.
collectd.spec
glibc-2.36.patch [new file with mode: 0644]
This page took 0.094155 seconds and 4 git commands to generate.