Barry Gershenfeld wrote:
> gcc sigthing.c
> sigthing.c: In function `main':
> sigthing.c:23: error: storage size of 'waitset' isn't known
> 
> #include <signal.h>
> 
> int main( int argc, char *argv[] ) {
>     struct sigset_t waitset;
>     sigemptyset( &waitset );
> }
> 
> 
> I have tried this on a number of different systems and I always get the same
> result.  It seems like some other header file might be required.  I'm not
> very good at interpreting what they put in those things.  There are also an
> average of four different files called "signal.h" on any given system.
> What is the path that <..> looks in?
> 
> One of the signal.h files (usr/include/sys/) has the line:
> 
> typedef unsigned long sigset_t;
> 
> but I can't tell if that gets considered or not.  Or if it even is an answer
> in the first place.

Is your code above using a typedef'ed symbol inappropriately

SB?
 sigset_t waitset;

Maybe you want?
 man select
 man select_tut

Of possible use as a sample recipe for verifying include definitions:

- - -
#include <stdio.h>
#include <sys/select.h>

#define show(X) printf("sizeof '%s' is %d bytes\n", #X, sizeof(X))

int main(int ac, char* av[])
{
    show(sigset_t);
    return 0;
}
- - -

Also: you mentioned that this was an embedded app -- maybe the standard
linux/posix stuff is not present?

Regards,
..jim

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to