Re: [Bug-wget] wget 1.13: FIONBIO does not exist on solaris

2011-09-04 Thread Giuseppe Scrivano
Christian Jullien eli...@orange.fr writes:

 When compiling gnutls.c on solaris 10 sparc with gcc 4.6.1
 I get an error on:
   ret = ioctl (fd, FIONBIO, one);
 because FIONBIO is undefined.
  
 Adding: 
  
 #include sys/fcntl.h

 Let:
 #ifdef F_GETFL
   ret = fcntl (fd, F_SETFL, flags | O_NONBLOCK);

 to be used instead. It then compiles and correctly works.
  
 Thank you to see how to include sys/fcntl.h conditionnally. I checked but it
 is not clear to me when and why you decide to include this system file.
  
 I'll be glad to test new versions for you.

Thanks to have reported it.  We can assume sys/fcntl.h is always present
as gnulib will provide a replacement on systems where this file is
missing.

The change I am going to commit is simply:

=== modified file 'src/gnutls.c'
--- src/gnutls.c2011-08-30 14:43:25 +
+++ src/gnutls.c2011-09-04 10:43:35 +
@@ -48,6 +48,8 @@
 #include ptimer.h
 #include ssl.h
 
+#include sys/fcntl.h
+
 #ifdef WIN32
 # include w32sock.h
 #endif




[Bug-wget] wget 1.13: FIONBIO does not exist on solaris

2011-09-03 Thread Christian Jullien
When compiling gnutls.c on solaris 10 sparc with gcc 4.6.1
I get an error on:
  ret = ioctl (fd, FIONBIO, one);
because FIONBIO is undefined.
 
Adding: 
 
#include sys/fcntl.h

Let:
#ifdef F_GETFL
  ret = fcntl (fd, F_SETFL, flags | O_NONBLOCK);

to be used instead. It then compiles and correctly works.
 
Thank you to see how to include sys/fcntl.h conditionnally. I checked but it
is not clear to me when and why you decide to include this system file.
 
I'll be glad to test new versions for you.
 
Christian