Hi,
  I was trying to compile a simple prog....

/* snippet */

#define MODULE
#include <signal.h>
#include <linux/module.h>

int init_module (void) /* Loads a module in the kernel */
{
        printk("Loading module \n");
        return 0;
}

void cleanup_module(void) /* Removes module from kernel */
{
        printk("Unloaded waste module \n");
}

/* End Code*/

When I try to compile this with gcc -c filename.c
I get following errors.....
/usr/include/linux/time.h:9: error: redefinition of ‘struct timespec’
/usr/include/linux/time.h:15: error: redefinition of ‘struct timeval’
/usr/include/linux/time.h:20: error: redefinition of ‘struct timezone’
/usr/include/linux/time.h:47: error: redefinition of ‘struct itimerval’
In file included from filename.c :3:
/usr/include/linux/module.h:41: error: field ‘attr’ has incomplete type
/usr/include/linux/module.h:49: error: field ‘kobj’ has incomplete type

Any * 's??? (No pun intended!!)

Thanks
Saurabh



-----------------------------------------
Some never learn.....
Others don't have good teachers!!



 
____________________________________________________________________________________
Need a quick answer? Get one in minutes from people who know.
Ask your question on www.Answers.yahoo.com

Reply via email to