[PATCH] Fix XFree86 build

From: Matthew Wilcox
Date: Fri Nov 14 2003 - 15:23:02 EST



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
diff -u -p -r1.1 kd.h
--- a/include/linux/kd.h 29 Jul 2003 17:02:13 -0000 1.1
+++ b/include/linux/kd.h 14 Nov 2003 20:18:38 -0000
@@ -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;

--
"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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/