sd-bus.h not accepted by gcc when -I/usr/include/elogind is added
- Take a fresh 3.18.2 minirootfs (I tried with armv7)
- install gcc libc-dev elogind-dev
~# cat t.c
#include <systemd/sd-bus.h>
~# pkg-config --cflags libsystemd
-I/usr/include/elogind
~# gcc -pedantic -Werror -c t.c
~# gcc -pedantic -Werror -I /usr/include/elogind -c t.c
In file included from t.c:1:
/usr/include/elogind/systemd/sd-bus.h:96:43: error: ISO C restricts enumerator values to range of 'int' [-Werror=pedantic]
96 | SD_BUS_CREDS_UNIQUE_NAME = 1ULL << 31,
| ^~~~
/usr/include/elogind/systemd/sd-bus.h:97:43: error: ISO C restricts enumerator values to range of 'int' [-Werror=pedantic]
97 | SD_BUS_CREDS_WELL_KNOWN_NAMES = 1ULL << 32,
| ^~~~
/usr/include/elogind/systemd/sd-bus.h:98:43: error: ISO C restricts enumerator values to range of 'int' [-Werror=pedantic]
98 | SD_BUS_CREDS_DESCRIPTION = 1ULL << 33,
| ^~~~
/usr/include/elogind/systemd/sd-bus.h:99:43: error: ISO C restricts enumerator values to range of 'int' [-Werror=pedantic]
99 | SD_BUS_CREDS_AUGMENT = 1ULL << 63, /* special flag, if on sd-bus will augment creds struct, in a potentially race-full way. */
| ^~~~
/usr/include/elogind/systemd/sd-bus.h:100:43: error: ISO C restricts enumerator values to range of 'int' [-Werror=pedantic]
100 | _SD_BUS_CREDS_ALL = (1ULL << 34) -1
| ^
In file included from /usr/include/elogind/systemd/sd-bus.h:125:
/usr/include/elogind/systemd/sd-bus-vtable.h:48:54: error: ISO C restricts enumerator values to range of 'int' [-Werror=pedantic]
48 | _SD_BUS_VTABLE_CAPABILITY_MASK = 0xFFFFULL << 40
| ^~~~~~~~~
cc1: all warnings being treated as errors
~# diff -ru /usr/include/systemd /usr/include/elogind
~# diff -ru /usr/include/systemd /usr/include/elogind/systemd
~# diff -ru /usr/include/systemd/systemd /usr/include/elogind/systemd
Expected outcome: Since pkg-config --cflags adds -I/usr/include/elogind, it should compile with that instead of throwing errors.