semaphore.h does'nt include fcntl.h ?

2007-01-16 Thread girish r
sysv semaphores are different from POSIX semaphores, so loading sysvsem.ko won't help you here. It looks like the sem module is missing from /usr/src/sys/modules/Makefile, which explains why you don't have it :) You can build it manually though: cd /usr/src/sys/modules/sem make obj make

semaphore.h does'nt include fcntl.h ?

2007-01-15 Thread girish r
Do you have SysV IPC support in your kernel? -Kip You'll need to include options P1003_1B_SEMAPHORES in your kernel config, or load the sem kernel module. --Dan Nelson Thanks, that was it! Get your own

semaphore.h does'nt include fcntl.h ?

2007-01-15 Thread girish r
You'll need to include options P1003_1B_SEMAPHORES in your kernel config, or load the sem kernel module. --Dan Nelson I could'nt find sem so I tried sysvsem.ko but I get: kldload: can't load sysvsem: File exists Does it mean that sysvsem support is already present in the kernel? I am using

Re: semaphore.h does'nt include fcntl.h ?

2007-01-15 Thread Dan Nelson
In the last episode (Jan 15), girish r said: You'll need to include options P1003_1B_SEMAPHORES in your kernel config, or load the sem kernel module. --Dan Nelson I could'nt find sem so I tried sysvsem.ko but I get: kldload: can't load sysvsem: File exists Does it mean that sysvsem

semaphore.h does'nt include fcntl.h ?

2007-01-14 Thread girish r
Hello folks, I am trying to use sem_open(3) but gcc complains that O_CREAT and O_EXCL is undeclared. According to the man page only semaphore.h needs to be included. But including fcntl.h solves the problem. sem_t *lock = sem_open(example_lock, O_CREAT | O_EXCL, 0600, 1); Another thing, a

Re: semaphore.h does'nt include fcntl.h ?

2007-01-14 Thread Dan Nelson
In the last episode (Jan 14), girish r said: I am trying to use sem_open(3) but gcc complains that O_CREAT and O_EXCL is undeclared. According to the man page only semaphore.h needs to be included. But including fcntl.h solves the problem. Looks like a semaphore.h needs to define O_CREAT and

Re: semaphore.h does'nt include fcntl.h ?

2007-01-14 Thread Kip Macy
Do you have SysV IPC support in your kernel? -Kip On Sun, 14 Jan 2007, girish r wrote: Hello folks, I am trying to use sem_open(3) but gcc complains that O_CREAT and O_EXCL is undeclared. According to the man page only semaphore.h needs to be included. But