[realtek] compiling rtl8139.c

Tim Dijkstra tdykstra@science.uva.nl
Thu, 03 May 2001 13:33:02 +0200


Donald Becker wrote:


> Are you running Red Hat?  Read
>    http://www.scyld.com/network/updates.html
> 
Sorry I hadn't seen that and yes I'm running RH7.0 the kernel is
2.2.17-4 and my machine is a Alpha 2100-4/233. I followed the directions
above the 'struct has no member..' errors disappear, but I'm still
having problems. 

I installed the rpm with 'the header files from the kernel that is
actually running'. I now have dir /usr/src/linux-2.2.17 (and a symlink
/usr/src/linux to it). If I now use the given compile command, I get the
following:

> [root@speelgoedmannetje rtl8139]# kgcc -I/usr/src/linux/include -DMODULE -D__KERNEL__ -O6 -c rtl8139.c
> In file included from /usr/src/linux/include/asm/semaphore.h:11,
>                  from /usr/src/linux/include/linux/sched.h:17,
>                  from /usr/src/linux/include/linux/mm.h:4,
>                  from /usr/src/linux/include/linux/slab.h:14,
>                  from /usr/src/linux/include/linux/malloc.h:4,
>                  from rtl8139.c:102:
> /usr/src/linux/include/asm/current.h:4: global register variable follows a function definition
> /usr/src/linux/include/asm/current.h:4: warning: call-clobbered register used for global register variable


So there seams something wrong with current.h:
> [root@speelgoedmannetje rtl8139]# cat /usr/src/linux/include/asm/current.h
> #ifndef _ALPHA_CURRENT_H
> #define _ALPHA_CURRENT_H
> 
> register struct task_struct *current __asm__("$8");
> 
> #endif /* !(_ALPHA_CURRENT_H) */


I'm not really a kernel-building-guru, so I'm not sure what to make of
that. Is this what's supposed to be there? Looks a little bit empty to
me... 

Do you think this is the problem or have I just done something wrong? 

Thanks Tim