I did stumble across a compilation error in /usr/include/linux/un.h that
appeared only because of the compilation flags we're using: the dreaded
"-ansi -pedantic". It's a project requirement which resulted from
problems with portability between compilers (commercial compilers were
rejecting things gcc ignored, even with -Wall and friends turned on) and
architectures, and it's something I can't do much about. gcc complained
about the zero-length array which is declared in the cmsghdr struct in
un.h. I understand why it's being done that way; I've seen other OS's do
the same thing.
I'd built this stuff under Linux 1.2.13 and some 1.3.x kernels, and in
their versions of un.h, the cmsghdr struct wasn't there. The only type
definition in the file was sockaddr_un.
I see myself as having only a couple of choices, and I'd appreciate any
feedback, if anyone's in the mood:
1. Don't compile with -ansi -pedantic: It'd certainly work, but I wouldn't
be able to submit these modifications for integration into our final
product.
2. Change the array to have one element.
3. Find a new home, either in a new file or through an #ifdef, for the
cmsghdr struct.
Any thoughts??? Thanks!
--------------------------------------
Christopher A. Smith
Arlington VA * casmith@clark.net