[vortex] How to use gettimeofday inside 3c59x.c ?
Andrew Morton
andrewm@uow.edu.au
Sat, 24 Mar 2001 00:26:08 +1100
Marcus Ramos wrote:
>
> Hello,
>
> I've modified 3c59x.c code in order to be able to insert GPS timestamps
> in UDP packets both when they are sent and when they are received from
> the net. As the GPS receivers are not available yet, I wanted to test my
> code by using "gettimeofday" (local CPU clock) instead. This way I won't
> have accurate time references, but will anyway be able to test the code.
>
> The problem is that, after compiling without erros, insmod will not load
> the module (3c59x.o) because it says it cannot resolve the symbol
> "gettimeofday". If I #include <sys/time.h> and <unistd.h> in the source
> code, as mentioned in man gettimeofday, I get many conflicts due to
> duplicated symbols during compilation.
>
Use do_gettimeofday(). You'll probably need to add
EXPORT_SYMBOL(do_gettimeofday)
to arch/i386/kernel/ksyms.c
This is kernel 2.4