Summary: | xorg-x11-6.7.0-r1 fails to emerge on sparc (rate, period, lnx_io.c) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jeremy Huddleston (RETIRED) <eradicator> |
Component: | Current packages | Assignee: | Gentoo X packagers <x11> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | sparc |
Priority: | High | Keywords: | Inclusion |
Version: | 1.4 | ||
Hardware: | Sparc | ||
OS: | All | ||
URL: | https://freedesktop.org/bugzilla/show_bug.cgi?id=825 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 58368 | ||
Bug Blocks: | 60292 | ||
Attachments: |
patch to fix (-p1 in xc)
sparc-x11.patch xorg-sparc26headers.patch |
Description
Jeremy Huddleston (RETIRED)
2004-07-01 00:18:31 UTC
odd... here are lines 128-131 in lnx_io.c: kbdrate_s.rate = (rate + 5) / 10; /* must be integer, so round up */ kbdrate_s.delay = delay * HZ / 1000; /* convert ms to Hz */ if (kbdrate_s.rate > 50) kbdrate_s.rate = 50; where is gcc getting the 'period' from... Take a look at http://dev.gentoo.org/~spyderous/xfree/patchsets/4.3.0/patch-2.1.26.18/9020_all_4.3.0-fix-2.5-headers-rate-period.patch It was pulled out of upstream and illustrates the point, I believe. ah... ok... it looks like sparc is the only archs that actually use that chunk of code: /usr/src/linux/include $ grep -R kbd_rate * asm/kbio.h:struct kbd_rate { asm/kbio.h:#define KIOCSRATE _IOW('k', 40, struct kbd_rate) asm/kbio.h:#define KIOCGRATE _IOW('k', 41, struct kbd_rate) asm-sparc/kbio.h:struct kbd_rate { asm-sparc/kbio.h:#define KIOCSRATE _IOW('k', 40, struct kbd_rate) asm-sparc/kbio.h:#define KIOCGRATE _IOW('k', 41, struct kbd_rate) asm-sparc64/kbio.h:struct kbd_rate { asm-sparc64/kbio.h:#define KIOCSRATE _IOW('k', 40, struct kbd_rate) asm-sparc64/kbio.h:#define KIOCGRATE _IOW('k', 41, struct kbd_rate) linux/vt_kern.h:extern int kbd_rate(struct kbd_repeat *rep); 2.6.7 actually goes back to using 'rate' instead of 'period'. I'll try to find out what version it changed back in so we can update that conditional... Created attachment 34565 [details, diff]
patch to fix (-p1 in xc)
I looked at 2.6.7, 2.6.0 2.5.60 2.4.49, 2.4.42, and 2.4.41... all the
asm-sparc(64)?/knio.h's struct kbd_rate have rate and not period.
The #define is to catch the rate in linux/kd.h being changed to period... but
it messes up asm-sparc(64)'s kbio.h (notice the sparc conditional ifdef for
that inclusion)...
This patch fixes the error by moving the #undef to the correct place (effecting
just the kbd_repeat).
Thanks for pointing this out again, Jeremy. Created attachment 35860 [details, diff]
sparc-x11.patch
This one includes the xf86Sbus.h hunk as well.
Created attachment 38764 [details, diff]
xorg-sparc26headers.patch
Fixed patch to apply correctly. This is still needed for 6.8.0 RC3 compilation
with 2.6 headers on sparc. Please include it in the next RC or -r1.
it'll be in 904 The patch is in and working fine. Upstream knows of the issue as well... |