--- ./arch/um/sys-i386/Makefile.fix 2004-01-17 19:03:18.000000000 +0100 +++ ./arch/um/sys-i386/Makefile 2004-01-17 19:26:17.000000000 +0100 @@ -1,6 +1,10 @@ obj-y = bugs.o checksum.o extable.o fault.o ksyms.o ldt.o ptrace.o \ ptrace_user.o semaphore.o sigcontext.o syscalls.o sysrq.o time.o +# The kernel 2.6 renamed struct modify_ldt_ldt_s (its name in 2.4) as +# struct user_desc. I hope that glibc will fix this, but for now this workaround is included. +CFLAGS_bugs.o = -DLDT_STRUCT_NAME=$(shell if grep -q user_desc /usr/include/asm/ldt.h ; then echo user_desc; else echo modify_ldt_ldt_s; fi) + obj-$(CONFIG_HIGHMEM) += highmem.o obj-$(CONFIG_MODULES) += module.o --- ./arch/um/sys-i386/bugs.c.fix 2004-01-17 18:41:19.000000000 +0100 +++ ./arch/um/sys-i386/bugs.c 2004-01-17 19:27:49.000000000 +0100 @@ -141,12 +141,12 @@ return(1); } -#if 0 /* This doesn't work in tt mode, plus it's causing compilation problems - * for some people. - */ +extern int modify_ldt(int func, void *ptr, unsigned long bytecount); + static void disable_lcall(void) { - struct modify_ldt_ldt_s ldt; + /*See Makefile comments for why we use LDT_STRUCT_NAME*/ + struct LDT_STRUCT_NAME ldt; int err; bzero(&ldt, sizeof(ldt)); @@ -157,13 +157,10 @@ if(err) printk("Failed to disable lcall7 - errno = %d\n", errno); } -#endif void arch_init_thread(void) { -#if 0 disable_lcall(); -#endif } void arch_check_bugs(void)