Author: jhoblitt
Date: Thu Oct  6 13:30:29 2005
New Revision: 9383

Modified:
   trunk/config/init/hints/dec_osf.pl
   trunk/io/io_unix.c
Log:
fix missing socklen_t on tru64/osf - patch from jhi


Modified: trunk/config/init/hints/dec_osf.pl
==============================================================================
--- trunk/config/init/hints/dec_osf.pl  (original)
+++ trunk/config/init/hints/dec_osf.pl  Thu Oct  6 13:30:29 2005
@@ -6,6 +6,10 @@ my $ccflags = Configure::Data->get('ccfl
 if ( $ccflags !~ /-pthread/ ) {
     $ccflags .= ' -pthread';
 }
+if ( $ccflags !~ /-D_XOPEN_SOURCE=/ ) {
+    # Request all POSIX visible (not automatic for cxx, as it is for cc)
+    $ccflags .= ' -D_XOPEN_SOURCE=500';
+}
 Configure::Data->set(
     ccflags => $ccflags,
 );

Modified: trunk/io/io_unix.c
==============================================================================
--- trunk/io/io_unix.c  (original)
+++ trunk/io/io_unix.c  Thu Oct  6 13:30:29 2005
@@ -825,14 +825,14 @@ static ParrotIO *
 PIO_unix_accept(theINTERP, ParrotIOLayer *layer, ParrotIO *io)
 {
     int newsock;
-    int newsize;
+    socklen_t newsize;
     ParrotIO *newio;
 
     UNUSED(layer);
     newio = PIO_new(interpreter, PIO_F_SOCKET, 0, PIO_F_READ|PIO_F_WRITE);
 
     if ((newsock = accept(io->fd, (struct sockaddr *)&newio->remote,
-                                  (socklen_t *)&newsize)) == -1)
+                          &newsize)) == -1)
     {
         fprintf(stderr, "accept: errno=%d", errno);
         /* Didn't get far enough, free the io */

Reply via email to