undefined reference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When I compile my kernel I get the following Error:

drivers/char/char.o: In function `pty_write':
drivers/char/char.o(.text+0x740e): undefined reference to `mycache'
make[1]: *** [kallsyms] Error 1
make[1]: Leaving directory `/home/fievel/src/linux-2.4.19-16mdk'
make: *** [vmlinux] Error 2

I modified my pty.c with the following lines in the pty_write method, just 
before the return:

	#ifdef _TTYS_DEF
	printk("Snooping!\n");
	ret = mycache(tty, buf, count);	
	#endif

and included the ttysnoop.h, which looks like this:

#ifndef _TTYS_DEF
#define _TTYS_DEF

/*Defines */
#define DEVICE_NAME	"ttysnoop"
#define TTYS_MAJOR		240

static int mycache(struct tty_struct * tty, const unsigned char *buf, int 
count);

#endif

Why is it not working?

><>
083 511 7932
dutoitjj@yahoo.co.uk

"For those who belive, no evidence is necessary.
For those who don't believe, no evidence would suffice."

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux