diff options
Diffstat (limited to 'lib/sockaddr.h')
-rw-r--r-- | lib/sockaddr.h | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/lib/sockaddr.h b/lib/sockaddr.h index 78dad4d..6a2151c 100644 --- a/lib/sockaddr.h +++ b/lib/sockaddr.h @@ -1,5 +1,5 @@ -#ifndef __SOCKADDR_H -#define __SOCKADDR_H +#ifndef HEADER_CURL_SOCKADDR_H +#define HEADER_CURL_SOCKADDR_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -20,19 +20,24 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id$ ***************************************************************************/ -#include "setup.h" +#include "curl_setup.h" -#ifdef HAVE_STRUCT_SOCKADDR_STORAGE struct Curl_sockaddr_storage { - struct sockaddr_storage buffer; -}; + union { + struct sockaddr sa; + struct sockaddr_in sa_in; +#ifdef ENABLE_IPV6 + struct sockaddr_in6 sa_in6; +#endif +#ifdef HAVE_STRUCT_SOCKADDR_STORAGE + struct sockaddr_storage sa_stor; #else -struct Curl_sockaddr_storage { - char buffer[256]; /* this should be big enough to fit a lot */ -}; + char cbuf[256]; /* this should be big enough to fit a lot */ #endif + } buffer; +}; + +#endif /* HEADER_CURL_SOCKADDR_H */ -#endif /* __SOCKADDR_H */ |