[gpm] [PATCH] open_console.c: fix major() build failure due to glibc 2.28

Giulio Benetti giulio.benetti@micronovasrl.com
Sat Sep 15 14:55:14 CEST 2018


glibc 2.28 no longer includes <sys/sysmacros.h> from <sys/types.h>,
and therefore <sys/sysmacros.h> must be included explicitly when
major() is used.

This commit adds a patch to directly include <sys/sysmacros.h> into
open_console.c file where major() macro is used.

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
 src/daemon/open_console.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/daemon/open_console.c b/src/daemon/open_console.c
index 98297c9..d7acd40 100644
--- a/src/daemon/open_console.c
+++ b/src/daemon/open_console.c
@@ -22,6 +22,7 @@
 #include <fcntl.h>                  /* open and co.      */
 #include <sys/stat.h>               /* stat()            */
 #include <sys/ioctl.h>              /* ioctl             */
+#include <sys/sysmacros.h>
 
 /* Linux specific (to be outsourced in gpm2 */
 #include <linux/serial.h>           /* for serial console check */
-- 
2.17.1



More information about the gpm mailing list