--- ./arch/um/sys-i386/Makefile.Debian 2003-12-30 16:44:42.000000000 +0100 +++ ./arch/um/sys-i386/Makefile 2003-12-30 17:31:22.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 +# 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.Debian 2003-12-28 12:51:48.000000000 +0100 +++ ./arch/um/sys-i386/bugs.c 2003-12-30 17:31:22.000000000 +0100 @@ -105,9 +105,12 @@ return(1); } +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));