--- gpm-1.20.7.orig/src/daemon/open_console.c	2012-10-26 23:21:38.000000000 +0200
+++ gpm-1.20.7/src/daemon/open_console.c	2013-12-22 12:54:02.000000000 +0100
@@ -27,6 +27,8 @@
 #include <linux/serial.h>           /* for serial console check */
 #include <asm/ioctls.h>            /* for serial console check */
 
+#define major(dev) (((unsigned) (dev))>>8)
+#define minor(dev) ((dev)&0xff)
 
 #include "headers/message.h"        /* messaging in gpm  */
 #include "headers/daemon.h"         /* daemon internals  */
