xserver/config
Olivier Fourdan 58a086d907 config: Fix build with udev disabled
Commit b5b52979 has split the options "udev" and "udev_kms" for systems
without systemd.

Yet, when building with "-Dudev=false", "udev_kms" still defaults to
true.

That breaks the build because "config_udev_odev_probe()" is not defined:

| config/config.c: In function ‘config_odev_probe’:
| config/config.c:77:5: error: implicit declaration of function
|                       ‘config_udev_odev_probe’; did you mean
|                       ‘config_odev_probe’?
|                       [-Wimplicit-function-declaration]
|   77 |     config_udev_odev_probe(probe_callback);
|      |     ^~~~~~~~~~~~~~~~~~~~~~
|      |     config_odev_probe
| config/config.c:77:5: warning: nested extern declaration of
|                       ‘config_udev_odev_probe’ [-Wnested-externs]

Yet, the code of the function "config_udev_odev_probe()" in config/udev.c
is within a "#ifdef udev_kms" conditional, so it is built.

The problem is that the function definition is within an "#ifdef udev"
in the "config_backends.h" header.

So, even though the actual code is compiled, the compiler will fail to
find the function definition, hence the "implicit declaration" error.

To avoid the issue, move the function definition within a separate
"udev_kms" conditional in the "config-backends.h" header file.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/work_items/1890
Fixes: b5b52979 ("meson: split udev from udev_kms which requires systemd")
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2203>
2026-05-11 23:58:47 +00:00
..
10-quirks.conf Strip trailing whitespace from source files 2026-01-25 10:40:02 -08:00
config-backends.h config: Fix build with udev disabled 2026-05-11 23:58:47 +00:00
config.c treewide: replace xnfcalloc() calls by XNFcallocarray() 2026-01-25 10:39:55 -08:00
dbus-api Strip trailing whitespace from source files 2026-01-25 10:40:02 -08:00
dbus-core.c include: move dbus-core.h to config 2026-01-25 10:39:52 -08:00
dbus-core.h include: move dbus-core.h to config 2026-01-25 10:39:52 -08:00
fdi2iclass.py fdi2iclass: remove unused local variable 2022-04-02 18:06:30 +00:00
hal.c Move sizeof to second argument in calloc calls 2026-01-25 10:39:55 -08:00
meson.build meson: replace join_paths() with / operator 2026-03-28 10:02:41 -07:00
udev.c config: Fix compiler warning 2026-04-04 16:33:54 +00:00
wscons.c config: wscons: fix warning on discarded const 2026-01-19 12:32:24 -08:00
x11-input.fdi Strip trailing whitespace from source files 2026-01-25 10:40:02 -08:00