[lkml]   [2002]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: problem with <asm/semaphore.h>
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
Try compiling like this
$> gcc -D__KERNEL__ file.c


--- Hossein Mobahi <> 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
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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