Socket header file

Richard B. Johnson (root@analogic.com)
Wed, 18 Dec 1996 14:38:58 -0500 (EST)


I have been recompiling various network routines. There is a problem
with the following header file:

Linux chaos 2.1.15 #7 Fri Dec 13 13:08:45 EST 1996 i586

/usr/include/linux/socket.h: * (cmsghdr, cmsg_data[])
/usr/include/linux/socket.h: unsigned char cmsg_data[0];
^^^^^^^^^^^^^
/usr/include/linux/socket.h:#define CMSG_DATA(cmsg) (cmsg)->cmsg_data
^^^^^^^^^^^
referenced as a pointer
In file included from /usr/local/include/sys/socket.h:5,
from nettest.c:11:
/usr/local/include/linux/socket.h:53: warning: ANSI C forbids zero-size
array `cmsg_data'

This should probably be:
unsigned char *cmsg_data;
instead of:
unsigned char cmsg_data[0];

I don't know how many things this would break.

Cheers,
Dick Johnson
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard B. Johnson
Project Engineer
Analogic Corporation
Voice : (508) 977-3000 ext. 3754
Fax : (508) 532-6097
Modem : (508) 977-6870
Ftp : ftp@boneserver.analogic.com
Email : rjohnson@analogic.com, johnson@analogic.com
Penguin : Linux version 2.1.15 on an i586 machine.
Warning : It's hard to remain at the trailing edge of technology.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-