mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "immortal1015" <immortal1015@hotpop.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: compiling errors
Date: Wed, 2 Oct 2002 2:7:1 +0800	[thread overview]
Message-ID: <20021001180459.E4AD92F8147@smtp-1.hotpop.com> (raw)

I tried to compile the very simple kernel module code as following.
I compile this code using gcc -c hello.c, but gcc tell me:
 /usr/include/linux	/module.h:60 parse error before 'atomic_t'

What is the error? My gcc version is 2.96.


//////////////////////////////////////////////////////////////////////////////
#ifndef __KERNEL__
#  define __KERNEL__
#endif
#ifndef MODULE
#  define MODULE
#endif
#include <linux/version.h>
#include <linux/config.h>
#include <linux/module.h>

#include <linux/kernel.h> /* printk */

int init_module(void)
{
	printk("<1>Hello the world\n");
	return 0;
}

void cleanup_module(void)
{
	printk("<1>Goodbye the world\n");	
}
/////////////////////////////////////////////////////////////////


Best regards
yours Brucie





             reply	other threads:[~2002-10-01 18:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-01 18:07 immortal1015 [this message]
2002-10-01 18:22 ` Arjan van de Ven
2002-10-01 18:53 immortal1015
2002-10-01 19:20 ` Richard B. Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021001180459.E4AD92F8147@smtp-1.hotpop.com \
    --to=immortal1015@hotpop.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®