[glib-networking/wip/openssl: 11/31] tls/openssl/openssl-util.c: Fix Build On MSVC
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/wip/openssl: 11/31] tls/openssl/openssl-util.c: Fix Build On MSVC
- Date: Mon, 9 Nov 2015 08:04:57 +0000 (UTC)
commit c11e0721fd74acda2f0d4653621adff512d0a4d8
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Thu Sep 3 14:38:23 2015 +0800
tls/openssl/openssl-util.c: Fix Build On MSVC
Visual Studio does not have strncasecmp(), but instead uses _strnicmp(),
which is identical. Note that the GLib functions are not used here
because this file does not in any way include the GLib headers.
tls/openssl/openssl-util.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/tls/openssl/openssl-util.c b/tls/openssl/openssl-util.c
index 9c0a2f5..5ba63f1 100644
--- a/tls/openssl/openssl-util.c
+++ b/tls/openssl/openssl-util.c
@@ -67,6 +67,10 @@
#include <string.h>
#include <openssl/x509v3.h>
+#ifdef _MSC_VER
+#define strncasecmp _strnicmp
+#endif
+
typedef int (*equal_fn) (const unsigned char *pattern, size_t pattern_len,
const unsigned char *subject, size_t subject_len,
unsigned int flags);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]