#2 Problematic INCLUDE

open
nobody
None
5
2003-06-26
2003-06-26
Tom
No

The following test C program will not compile:-

#include <stdio.h>
#include <iovec.h>

int main(int argc, char **argv) {
printf("Hello world\n");
return 1;
}

# cc -Wall -O2 -I.. -I/usr/include/oskit/io/ -c -o test.o
test.c
In file included from test.c:2:
/usr/include/oskit/io/iovec.h:22: parse error before
`oskit_size_t'
/usr/include/oskit/io/iovec.h:22: warning: no semicolon
at end of struct or union
/usr/include/oskit/io/iovec.h:23: warning: data definition
has no type or storage class

The same program compiles without error when iovec.h
isnot included. I have
some other software which depends on iovec.h, which
also refuses to compile,
so I believe this to be a genuine problem with the
header, though I can't see
what's going on.

Discussion