]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix two warnings in test_link_handshake.c
authorNick Mathewson <nickm@torproject.org>
Thu, 3 Nov 2016 15:16:06 +0000 (11:16 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 3 Nov 2016 15:16:06 +0000 (11:16 -0400)
One is fixed by disabling the -Wredundant-decls warnings around
openssl headers here, because of the old double-declaration of
SSL_get_selected_srtp_profile().

One is fixed by including compat.h before or.h so that we get the
winsock2.h include before the windows.h include.

src/test/test_link_handshake.c

index 5273f3373f9381c2ebdb8594a5ccb2eb51067d9f..9899e542311f4476a6766d3458b1c179b681d3be 100644 (file)
@@ -7,8 +7,16 @@
 #define CONNECTION_PRIVATE
 #define TOR_CHANNEL_INTERNAL_
 #define TORTLS_PRIVATE
+
+#include "compat.h"
+
+/* Some versions of OpenSSL declare SSL_get_selected_srtp_profile twice in
+ * srtp.h. Suppress the GCC warning so we can build with -Wredundant-decl. */
+DISABLE_GCC_WARNING(redundant-decls)
 #include <openssl/x509.h>
 #include <openssl/ssl.h>
+ENABLE_GCC_WARNING(redundant-decls)
+
 #include "or.h"
 #include "config.h"
 #include "connection.h"