Skip to contentSkip to conversation

Fix XFree86 build

PATCH New Matthew Wilcox 1 participant 1 message Nov 14, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix XFree86 build

Hi Linus.

Andries changed the struct member's name from "period" to "rate" back in October 2002. This was great for kernel code, but not so good when the header is used for userspace (ie the XFree86 build uses it). The following patch restores the old name for the benefit of userspace.

Index: include/linux/kd.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/linux/kd.h,v
retrieving revision 1.1

include/linux/kd.h +4 -1
diff -u -p -r1.1 kd.h
@@ -134,8 +134,11 @@ struct kbkeycode {
 
 struct kbd_repeat {
 	int delay;	/* in msec; <= 0: don't change */
+#ifdef __KERNEL__
 	int period;	/* in msec; <= 0: don't change */
-			/* earlier this field was misnamed "rate" */
+#else
+	int rate;	/* earlier this field was misnamed "rate" */
+#endif
 };
 
 #define KDKBDREP        0x4B52  /* set keyboard delay/repeat rate;
Signature · 3 lines
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk