It turns out that the thing I sent before was from a Solaris 9 machine,
but apparently I need to compile it on a Solaris 8 machine.  When I went
to the Solaris 8 machine and looked in that header file, there wasn't
even a projid_t in the file, which makes me think it was different
headers.  However, I still get this error message when I try to compile
under Solaris 8:

gcc -fPIC -Dsocklen_t=int -I. -g -O2 -I. -I/stage/public/solaris/ruby
-I/stage/public/solaris/ruby -I/stage/public/solaris/ruby/ext/socket
-DHAVE_NETINET_TCP_H -DHAVE_NETINET_UDP_H -DHAVE_SENDMSG
-DHAVE_INET_NTOP -DHAVE_INET_PTON -DHAVE_GETSERVBYPORT
-DHAVE_ARPA_INET_H -DHAVE_ARPA_NAMESER_H -DHAVE_RESOLV_H -DHAVE_SYS_UN_H
-DHAVE_SYS_UIO_H -DHAVE_SOCKET -DHAVE_GETHOSTNAME
-Dss_family=__ss_family -Dss_len=__ss_len -c socket.c
socket.c:96:1: warning: "_SS_MAXSIZE" redefined
/usr/include/sys/socket.h:213:1: warning: this is the location of the
previous definition
socket.c:97:1: warning: "_SS_ALIGNSIZE" redefined
/usr/include/sys/socket.h:230:1: warning: this is the location of the
previous definition
socket.c:98:1: warning: "_SS_PAD1SIZE" redefined
/usr/include/sys/socket.h:235:1: warning: this is the location of the
previous definition
socket.c:99:1: warning: "_SS_PAD2SIZE" redefined
/usr/include/sys/socket.h:236:1: warning: this is the location of the
previous definition
socket.c:102: redefinition of `struct sockaddr_storage'
*** Error code 1
make: Fatal error: Command failed for target `socket.o'
Current working directory /stage/public/solaris/ruby/ext/socket
*** Error code 1
make: Fatal error: Command failed for target `all'
(01:16AM) [kdresner@sanjacinto /public/solaris/ruby]$

So how do I go about figuring out what headers I need for sys/socket.h?

Here are the #include's from the file...


#include <sys/types.h>
#include <sys/uio.h>
#include <sys/feature_tests.h>


-Kurt


On Sun, Aug 31, 2003 at 02:23:52PM +0900, nobu.nokada / softhome.net wrote:
> Hi,
> 
> At Sun, 31 Aug 2003 14:01:31 +0900,
> Kurt M. Dresner wrote:
> > > What headers do you need to compile sys/socket.h?
> > > 
> > >   #include <sys/socket.h>
> > >   int main() {return 0;}
> > 
> > Should I write this C program and try to compile it?
> 
> Yes, but you can't compile it.  We need to know how we can
> compile this simple code with gcc 3.0 on Solaris 8.
> 
> And as I mentioned;
> At Wed, 27 Aug 2003 11:43:46 +0900,
> nobu.nokada / softhome.net wrote:
> > > In file included from /usr/include/netinet/in.h:41,
> > >                  from /usr/include/sys/socket.h:203,
> > >                  from socket.c:31:
> > > /usr/include/sys/stream.h:307: parse error before "projid_t"
> > 
> > I have no clue about Solaris system headers, what are there
> > around that line?
> 
> What is before the line?
> 
> -- 
> Nobu Nakada
> 
>======= End of Original Message =======<