lkml.org 
[lkml]   [2002]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectcompiling errors
Date
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 and Redhat Linux 7.3


//////////////////////////////////////////////////////////////////////////////
#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



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.063 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site