[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] wget 1.13: FIONBIO does not exist on solaris
From: |
Giuseppe Scrivano |
Subject: |
Re: [Bug-wget] wget 1.13: FIONBIO does not exist on solaris |
Date: |
Sun, 04 Sep 2011 13:27:29 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
"Christian Jullien" <address@hidden> 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.c 2011-08-30 14:43:25 +0000
+++ src/gnutls.c 2011-09-04 10:43:35 +0000
@@ -48,6 +48,8 @@
#include "ptimer.h"
#include "ssl.h"
+#include <sys/fcntl.h>
+
#ifdef WIN32
# include "w32sock.h"
#endif