Jarkko Hietaniemi wrote:
>>io/io_unix.c does not compile because socklen_t is not defined.
>>
>>According to the standards, <sys/socket.h> is needed to get socklen_t.
>>
>>One could try including that the right way into io/io_unix.c, but I do
>>not know enough of Parrot conventions.  Instead, the below patch helps:
>>
>>--- io/io_unix.c.dist   2005-10-03 20:54:25.000000000 +0300
>>+++ io/io_unix.c        2005-10-03 20:56:51.000000000 +0300
>>@@ -832,7 +832,7 @@
>>     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 */
>>
> 
> 
> Please ignore that patch, it doesn't work since socklen_t is a long,
> not an int, and in Tru64 one shall not mix those.

Please ignore the ignore :-)  It seems that "it depends" how long the
socklen_t is in Tru64, and with cxx (the C++ compiler) and the flags
Parrot compilation uses, int is fine.  So the above patch is fine for
now.  In the long run the newsize really should be socklen_t.  Getting
that to be defined seems to be little tricky with cxx, so please don't
change that right now... in the meanwhile, I found another bug in the
IO code, bug report coming soon.


> 
> 
> 

Reply via email to