Re: problem with <asm/semaphore.h>

From: Shanks (mshanks79@yahoo.co.in)
Date: Tue Jun 04 2002 - 06:44:21 EST


Hi Hossein,

If you look inside <asm/semaphore.h> you will see that
the definition of struct semaphore is within a
conditional #ifdef __KERNEL__

Hence __KERNEL__ needs to be defined for this code to
compile.
Try compiling like this
$> gcc -D__KERNEL__ file.c

Regards,
Shanks

--- Hossein Mobahi <hmobahi@yahoo.com> wrote:
> Hi
> I compiled the following code with gcc under Redhat
> 7.2 :
> #include <asm/semaphore.h>
> main()
> {
> struct semaphore sum;
> }
>
> It doesn't compile, saying "storage size of `sem'
> isn't known".
>
> Sincerely
> --Hossein Mobahi

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
-
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/



This archive was generated by hypermail 2b29 : Fri Jun 07 2002 - 22:00:19 EST