> > >Peter Memishian wrote: >> > I have a question about the definition of struct pollhead: why this >> > structure is defined only #if defined(_KERNEL) || defined(_KMEMUSER)? >> > >> > The problem happens if we declare a variable with the type pollhead in >> > some data structures that are shared by kernel and libc, e.g. struct >> > sonode in <sys/socketvar.h>. >> > >> > So, I'm curious if it is possible to define struct pollhead without >> > _KERNEL and _KMEMUSER defined? >> >> I'm confused -- how would `struct sonode' be shared with userland? >> > ><sys/socketvar.h> is included in some userland libraries, and struct >sonode is defined without _KERNEL or _KMEMUSER. So, if we introduce a >pollhead variable in sonode, the userland library will fail to build.
If it needs to be included in user code, then the external function definition and type definitions which are pertinent only to the kernel should be bracketed with #if defined(_KERNEL) || defined(_KMEMUSER). Struct sonode is not a user data structure (it does look as if socketvar.h is shared for a reason with libc/libsocket. Casper _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
