diff options
author | Werner Koch <[email protected]> | 2014-03-07 08:46:44 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2014-03-07 15:06:35 +0000 |
commit | 3032fc3ad78ac9ed857570844547afed520d635a (patch) | |
tree | 5aa245750d356cbdf6e7d51fb97b7c0fc8d4dc17 /common/logging.c | |
parent | w32: Include winsock2.h to silence warnings. (diff) | |
download | gnupg-3032fc3ad78ac9ed857570844547afed520d635a.tar.gz gnupg-3032fc3ad78ac9ed857570844547afed520d635a.zip |
Silence several warnings when building under Windows.
* agent/call-scd.c (start_scd): Replace int by assuan_fd_t.
(start_pinentry): Ditto.
* common/asshelp.c (start_new_gpg_agent): Replace int by assuan_fd_t.
* common/dotlock.c (GNUPG_MAJOR_VERSION): Include stringhelp.h for
prototypes on Windows and some other platforms.
* common/logging.c (fun_writer): Declare addrbuf only if needed.
* g10/decrypt.c (decrypt_message_fd) [W32]: Return not_implemented.
* g10/encrypt.c (encrypt_crypt) [W32]: Return error if used in server
mode.
* g10/dearmor.c (dearmor_file, enarmor_file): Replace GNUPG_INVALID_FD
by -1 as temporary hack for Windows.
* g10/export.c (do_export): Ditto.
* g10/revoke.c (gen_desig_revoke, gen_revoke): Ditto.
* g10/sign.c (sign_file, clearsign_file, sign_symencrypt_file): Ditto.
* g10/server.c (cmd_verify, gpg_server) [W32]: Return an error.
--
The gpg server mode is not actual working and thus we can avoid the
warnings by explicitly disabling the mode. We keep it working under
Unix, though.
Diffstat (limited to '')
-rw-r--r-- | common/logging.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/logging.c b/common/logging.c index bdc284fef..40d098c89 100644 --- a/common/logging.c +++ b/common/logging.c @@ -257,7 +257,9 @@ fun_writer (void *cookie_arg, const void *buffer, size_t size) else { char *addrstr, *p; +#ifdef HAVE_INET_PTON void *addrbuf = NULL; +#endif /*HAVE_INET_PTON*/ addrstr = jnlib_malloc (strlen (name) + 1); if (!addrstr) @@ -281,7 +283,9 @@ fun_writer (void *cookie_arg, const void *buffer, size_t size) memset (&srvr_addr_in6, 0, sizeof srvr_addr_in6); srvr_addr_in6.sin6_family = af; srvr_addr_in6.sin6_port = htons (port); +#ifdef HAVE_INET_PTON addrbuf = &srvr_addr_in6.sin6_addr; +#endif /*HAVE_INET_PTON*/ srvr_addr = (struct sockaddr *)&srvr_addr_in6; addrlen = sizeof srvr_addr_in6; #else @@ -306,7 +310,9 @@ fun_writer (void *cookie_arg, const void *buffer, size_t size) memset (&srvr_addr_in, 0, sizeof srvr_addr_in); srvr_addr_in.sin_family = af; srvr_addr_in.sin_port = htons (port); +#ifdef HAVE_INET_PTON addrbuf = &srvr_addr_in.sin_addr; +#endif /*HAVE_INET_PTON*/ srvr_addr = (struct sockaddr *)&srvr_addr_in; addrlen = sizeof srvr_addr_in; } |