]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Refactored: made M_SSL dependent on USE_OPENSSL
authorAdriaan de Jong <dejong@fox-it.com>
Wed, 29 Jun 2011 12:53:41 +0000 (14:53 +0200)
committerDavid Sommerseth <davids@redhat.com>
Sat, 22 Oct 2011 09:32:40 +0000 (11:32 +0200)
Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
error.c
error.h

diff --git a/error.c b/error.c
index 2310f96a23441f9d24fbfdc4d1ba280ef9edeb3f..a0de53e804654bba4d24840a7582583505770962 100644 (file)
--- a/error.c
+++ b/error.c
 #include "ps.h"
 
 #ifdef USE_CRYPTO
+#ifdef USE_OPENSSL
 #include <openssl/err.h>
 #endif
+#endif
 
 #include "memdbg.h"
 
@@ -244,6 +246,7 @@ void x_msg (const unsigned int flags, const char *format, ...)
     }
 
 #ifdef USE_CRYPTO
+#ifdef USE_OPENSSL
   if (flags & M_SSL)
     {
       int nerrs = 0;
@@ -261,6 +264,7 @@ void x_msg (const unsigned int flags, const char *format, ...)
          SWAP;
        }
     }
+#endif
 #endif
 
   if (flags & M_OPTERR)
diff --git a/error.h b/error.h
index 4be3268872d6418c6836d5ea43c7008a1e64405a..13221bd45a1e18581b234e32fa17f3d699e19ade 100644 (file)
--- a/error.h
+++ b/error.h
@@ -95,7 +95,11 @@ extern int x_msg_line_num;
 
 #define M_ERRNO           (1<<8)        /* show errno description */
 #define M_ERRNO_SOCK      (1<<9)        /* show socket errno description */
-#define M_SSL             (1<<10)       /* show SSL error */
+
+#ifdef USE_OPENSSL
+#  define M_SSL             (1<<10)     /* show SSL error */
+#endif
+
 #define M_NOMUTE          (1<<11)        /* don't do mute processing */
 #define M_NOPREFIX        (1<<12)        /* don't show date/time prefix */
 #define M_USAGE_SMALL     (1<<13)        /* fatal options error, call usage_small */