[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 62/178: curl_setup: provide a CURL_SA_FAMILY_T type
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 62/178: curl_setup: provide a CURL_SA_FAMILY_T type if none exists |
Date: |
Wed, 23 May 2018 12:24:57 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 8020a0c62f79239c802ed6fa840b11677176910a
Author: Daniel Stenberg <address@hidden>
AuthorDate: Fri Apr 6 15:26:04 2018 +0200
curl_setup: provide a CURL_SA_FAMILY_T type if none exists
... and use this type instead of 'sa_family_t' in the code since several
platforms don't have it.
Closes #2463
---
lib/curl_addrinfo.c | 4 ++--
lib/curl_setup.h | 5 +++++
lib/tftp.c | 4 ++--
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/lib/curl_addrinfo.c b/lib/curl_addrinfo.c
index 01775f704..55d5a3942 100644
--- a/lib/curl_addrinfo.c
+++ b/lib/curl_addrinfo.c
@@ -345,7 +345,7 @@ Curl_he2ai(const struct hostent *he, int port)
addr = (void *)ai->ai_addr; /* storage area for this info */
memcpy(&addr->sin_addr, curr, sizeof(struct in_addr));
- addr->sin_family = (sa_family_t)(he->h_addrtype);
+ addr->sin_family = (CURL_SA_FAMILY_T)(he->h_addrtype);
addr->sin_port = htons((unsigned short)port);
break;
@@ -354,7 +354,7 @@ Curl_he2ai(const struct hostent *he, int port)
addr6 = (void *)ai->ai_addr; /* storage area for this info */
memcpy(&addr6->sin6_addr, curr, sizeof(struct in6_addr));
- addr6->sin6_family = (sa_family_t)(he->h_addrtype);
+ addr6->sin6_family = (CURL_SA_FAMILY_T)(he->h_addrtype);
addr6->sin6_port = htons((unsigned short)port);
break;
#endif
diff --git a/lib/curl_setup.h b/lib/curl_setup.h
index e4503c64c..5593a3b5c 100644
--- a/lib/curl_setup.h
+++ b/lib/curl_setup.h
@@ -795,4 +795,9 @@ endings either CRLF or LF so 't' is appropriate.
# endif
# endif
+/* for systems that don't detect this in configure, use a sensible default */
+#ifndef CURL_SA_FAMILY_T
+#define CURL_SA_FAMILY_T unsigned short
+#endif
+
#endif /* HEADER_CURL_SETUP_H */
diff --git a/lib/tftp.c b/lib/tftp.c
index 7fd7b3751..b32960f82 100644
--- a/lib/tftp.c
+++ b/lib/tftp.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2018, Daniel Stenberg, <address@hidden>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -1010,7 +1010,7 @@ static CURLcode tftp_connect(struct connectdata *conn,
bool *done)
state->requested_blksize = blksize;
((struct sockaddr *)&state->local_addr)->sa_family =
- (sa_family_t)(conn->ip_addr->ai_family);
+ (CURL_SA_FAMILY_T)(conn->ip_addr->ai_family);
tftp_set_timeouts(state);
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 40/178: TODO: connection cache sharing is now supporte, (continued)
- [GNUnet-SVN] [gnurl] 40/178: TODO: connection cache sharing is now supporte, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 43/178: test1148: set a fixed locale for the test, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 41/178: cmake: Add advapi32 as explicit link library for win32, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 49/178: cookie: case-insensitive hashing for the domains, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 47/178: openssl: provide defines for argument typecasts to build warning-free, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 60/178: configure: detect sa_family_t, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 45/178: cookie: store cookies per top-level-domain-specific hash table, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 58/178: hash: calculate sizes with size_t instead of longs, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 53/178: FTP: allow PASV on IPv6 connections when a proxy is being used, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 42/178: docs: fix CURLINFO_*_T examples use of CURL_FORMAT_CURL_OFF_T, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 62/178: curl_setup: provide a CURL_SA_FAMILY_T type if none exists,
gnunet <=
- [GNUnet-SVN] [gnurl] 59/178: tool_operate: Fix retry on FTP 4xx to ignore other protocols, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 61/178: build: add picky compiler warning flags for gcc 6 and 7, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 46/178: openssl: fix build with LibreSSL 2.7, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 57/178: RELEASE-NOTES: synced, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 54/178: build-openssl.bat: allow custom paths for VS and perl, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 50/178: tls: fix mbedTLS 2.7.0 build + handle sha256 failures, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 52/178: file: restore old behavior for file:////foo/bar URLs, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 69/178: travis: use trusty for coverage build, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 70/178: travis: bump to clang 6 and gcc 7, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 85/178: README.md: add backers and sponsors, gnunet, 2018/05/23