X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=src%2Fconnect.c;h=83c5014b3e5ea24f8dd3bfe9df6d317939adc9b5;hb=795614dcbb8c29a657563a74b36558278e983606;hp=eeb4eb288f9a9d7b5782d8a93b14c28a0486d445;hpb=3f84a5e00e255ab46e69d8ff5e565b238fce4126;p=wget diff --git a/src/connect.c b/src/connect.c index eeb4eb28..83c5014b 100644 --- a/src/connect.c +++ b/src/connect.c @@ -66,7 +66,15 @@ so, delete this exception statement from your version. */ extern int errno; #endif - +/* Define sockaddr_storage where unavailable (presumably on IPv4-only + hosts). */ + +#ifndef ENABLE_IPV6 +# ifndef HAVE_STRUCT_SOCKADDR_STORAGE +# define sockaddr_storage sockaddr_in +# endif +#endif /* ENABLE_IPV6 */ + /* Fill SA as per the data in IP and PORT. SA shoult point to struct sockaddr_storage if ENABLE_IPV6 is defined, to struct sockaddr_in otherwise. */