[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#220814: Here's your help for this bug. :-)



Submitted for your consideration (and it should go upstream, too).
This is deeply obvious, but I added comments to explain what's being done
here.

(So just in case copyright issues apply to the comments or something:

Permission to use, copy, modify, distribute, and sell this patch for
any purpose is hereby granted without fee.  I make no representation
about the suitability of it for any purpose.  It is provided "as is" without
express or implied warranties.)

This is untested, but it ought to work.

--- lnx_io.c.orig	2004-01-14 20:01:04.000000000 -0500
+++ lnx_io.c	2004-01-14 20:14:56.000000000 -0500
@@ -73,7 +73,9 @@
 #include <asm/kbio.h>
 #endif
 
-/* Deal with spurious kernel header change */
+/* Deal with spurious kernel header change in struct kbd_repeat.
+   We undo this define after the routine using that struct is over,
+   so as not to interfere with other 'rate' elements.  */
 #if defined(LINUX_VERSION_CODE) && defined(KERNEL_VERSION)
 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,42)
 #  define rate period
@@ -115,6 +117,13 @@
 #endif /* KDKBDREP */
 }
 
+/* Undo the earlier define for the struct kbd_repeat problem. */
+#if defined(LINUX_VERSION_CODE) && defined(KERNEL_VERSION)
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,42)
+#  undef rate
+# endif
+#endif
+
 static int
 KIOCSRATE_ioctl_ok(int rate, int delay) {
 #ifdef KIOCSRATE

-- 
Nathanael Nerode  <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html





Reply to: