[PATCH] server: fix compile-time error due to missing system header file (UDEV support)

Guido Trentalancia guido at trentalancia.com
Thu Aug 29 15:50:39 UTC 2019


Prevent the following compile-time error due to a missing system
header file (see --enable-config-udev which defaults to "auto"):

  CCLD     Xorg
/usr/bin/ld: common/.libs/libcommon.a(udev.o): in function `device_added':
udev.c:(.text+0x2bb): undefined reference to `major'
/usr/bin/ld: udev.c:(.text+0x2fe): undefined reference to `minor'
/usr/bin/ld: udev.c:(.text+0x666): undefined reference to `minor'
/usr/bin/ld: udev.c:(.text+0x672): undefined reference to `major'
/usr/bin/ld: udev.c:(.text+0x69e): undefined reference to `minor'
/usr/bin/ld: udev.c:(.text+0x6ab): undefined reference to `major'
/usr/bin/ld: common/.libs/libcommon.a(udev.o): in function `device_removed':
udev.c:(.text+0xb6a): undefined reference to `minor'
/usr/bin/ld: udev.c:(.text+0xb77): undefined reference to `major'
/usr/bin/ld: common/.libs/libcommon.a(udev.o): in function `config_udev_odev_probe':
udev.c:(.text+0x10ee): undefined reference to `minor'
/usr/bin/ld: udev.c:(.text+0x10fc): undefined reference to `major'

Fixes: https://gitlab.freedesktop.org/xorg/xserver/issues/879

Signed-off-by: Guido Trentalancia <guido at trentalancia.com>

--- xorg-server-1.20.5-orig/config/udev.c	2019-08-29 17:07:08.472745416 +0200
+++ xorg-server-1.20.5/config/udev.c	2019-08-29 17:06:06.150742444 +0200
@@ -30,6 +30,7 @@
 #include <libudev.h>
 #include <ctype.h>
 #include <unistd.h>
+#include <sys/sysmacros.h>
 
 #include "input.h"
 #include "inputstr.h"


More information about the xorg-devel mailing list