public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Small problem, Can anybody help me?
@ 2004-05-06 14:01 Srinivas G.
  2004-05-06 14:28 ` Erik Mouw
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Srinivas G. @ 2004-05-06 14:01 UTC (permalink / raw)
  To: linux-kernel


Hi,

I have written a small hello.c program in the Linux Kernel version
2.4.18-3.

The code is as follows.
-----------------------


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

MODULE_LICENSE("GPL");

int Test_init(void)
{
	printk("<1> Hello World\n");
	return 0;
}

void Test_cleanup(void)
{
	printk("<1> Good bye\n");
}

module_init(Test_init);
module_exit(Test_cleanup);


I compiled it under same kernel version that is 2.4.18-3. It was showing
the following errors.

In file included from hello.c:2:
/usr/include/linux/module.h:60: parse error before `atomic_t'
/usr/include/linux/module.h:60: warning: no semicolon at end of struct
or union
/usr/include/linux/module.h:60: warning: no semicolon at end of struct
or union
/usr/include/linux/module.h:62: parse error before `}'
/usr/include/linux/module.h:62: warning: data definition has no type or
storage class
/usr/include/linux/module.h:91: parse error before `}'


The errors came due to a mistake in linux header file. Is it so...

Thanks in advance for any help you can come up with.

Regards,

Srinivas G





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-05-06 17:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-06 14:01 Small problem, Can anybody help me? Srinivas G.
2004-05-06 14:28 ` Erik Mouw
2004-05-06 17:27   ` David Woodhouse
2004-05-06 14:33 ` Dave Jones
2004-05-06 15:47 ` Richard B. Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox