Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 22473

Summary: 2.5.70 Kernel Headers Break XFree 4.3 compilation (keyboard)
Product: Gentoo Linux Reporter: Boyd Waters <waters.boyd>
Component: [OLD] Core systemAssignee: Gentoo X packagers <x11>
Status: RESOLVED DUPLICATE    
Severity: normal CC: magnade, x11
Priority: High    
Version: 1.4_rc4   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Boyd Waters 2003-06-08 23:22:01 UTC
OThe kernel headers in /usr/include/linux are supposed to be a copy of the
headers used to compile glibc. I recompiled gilbc with mm-sources (kernel
2.5.70-mm5), so I moved the includes over to /usr/include/linux.

Gentoo does not like this. But that's another story.

This story is about compiling XFree 4.3.0 after I did this. Compilation fails in
compiling the keyboard IO, because the new kernel keboard-repeat structure
renamed the element "rate" to "period". Because it's a time between repeats in
milliseconds, so it isn't a "rate". This pedantic "fix" breaks XFree:


lnx_io.c: In function `KDKBDREP_ioctl_ok':
lnx_io.c:90: error: structure has no member named `rate'
lnx_io.c:98: error: structure has no member named `rate'
lnx_io.c:100: error: structure has no member named `rate'
lnx_io.c:101: error: structure has no member named `rate'
lnx_io.c:102: error: structure has no member named `rate'
make[6]: *** [lnx_io.o] Error 1
make[6]: Leaving directory
`/var/tmp/portage/xfree-4.3.0-r3/work/xc/programs/Xserver/hw/xfree86/os-support/linux'



The change is very easy to make to the XFree sources, but I preferred to hack
the /usr/include/linux/kd.h:

struct kbd_repeat {
        int delay;      /* in msec; <= 0: don't change */
+#ifdef X_H
+        int rate;
+#else
        int period;     /* in msec; <= 0: don't change */
                        /* earlier this field was misnamed "rate" */
#endif
};


[grr... dogbert growling sound....]

(interesting is that this was the only problem I had. Pentium3 with GCC3.3)
Comment 1 Boyd Waters 2003-09-09 17:21:19 UTC
This is FIXED in most-recent release: XFree-4.3.99.11!

When new xfree package is unmasked, this bug should close.
Comment 2 Donnie Berkholz (RETIRED) gentoo-dev 2003-09-09 18:07:55 UTC
A rough estimate for that release is a year. I'll look through commits to see if I can find the specific one and backport it.
Comment 3 Boyd Waters 2003-09-20 16:03:01 UTC
/usr/include/linux/kd.h:

struct kbd_repeat {
        int delay;      /* in msec; <= 0: don't change */
+#ifdef X_H
+        int rate;
+#else
        int period;     /* in msec; <= 0: don't change */
                        /* earlier this field was misnamed "rate" */
#endif
};



This is no longer present in XFree-4.3.99.12.
Comment 4 Donnie Berkholz (RETIRED) gentoo-dev 2003-11-13 20:11:03 UTC

*** This bug has been marked as a duplicate of 17345 ***