diff options
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/iconv.c | 2 | ||||
-rw-r--r-- | source3/lib/sendfile.c | 3 | ||||
-rw-r--r-- | source3/lib/util_sock.c | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/source3/lib/iconv.c b/source3/lib/iconv.c index 6575dba5a9..3ceb637b8e 100644 --- a/source3/lib/iconv.c +++ b/source3/lib/iconv.c @@ -136,7 +136,7 @@ static size_t sys_iconv(void *cd, char **outbuf, size_t *outbytesleft) { size_t ret = iconv((iconv_t)cd, - (char **)inbuf, inbytesleft, + (void *)inbuf, inbytesleft, outbuf, outbytesleft); if (ret == (size_t)-1) { int saved_errno = errno; diff --git a/source3/lib/sendfile.c b/source3/lib/sendfile.c index 20b2371273..d1b178577c 100644 --- a/source3/lib/sendfile.c +++ b/source3/lib/sendfile.c @@ -383,7 +383,8 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of hdtrl.iov_base = NULL; hdtrl.iov_len = 0; } else { - hdtrl.iov_base += nwritten; + hdtrl.iov_base = + (caddr_t)hdtrl.iov_base + nwritten; hdtrl.iov_len -= nwritten; nwritten = 0; } diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index 822ff26331..7356b3ec35 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -43,9 +43,9 @@ bool is_ipaddress_v4(const char *str) bool is_ipaddress(const char *str) { +#if defined(HAVE_IPV6) int ret = -1; -#if defined(HAVE_IPV6) if (strchr_m(str, ':')) { char addr[INET6_ADDRSTRLEN]; struct in6_addr dest6; @@ -212,9 +212,9 @@ bool interpret_string_addr(struct sockaddr_storage *pss, const char *str, int flags) { - char addr[INET6_ADDRSTRLEN]; struct addrinfo *res = NULL; #if defined(HAVE_IPV6) + char addr[INET6_ADDRSTRLEN]; unsigned int scope_id = 0; if (strchr_m(str, ':')) { |