]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
fixed compilation warnings and errors when not using curl
authorMartin Willi <martin@strongswan.org>
Tue, 13 Mar 2007 14:52:18 +0000 (14:52 -0000)
committerMartin Willi <martin@strongswan.org>
Tue, 13 Mar 2007 14:52:18 +0000 (14:52 -0000)
src/libstrongswan/Makefile.am
src/libstrongswan/crypto/ca.c
src/libstrongswan/crypto/ocsp.c
src/libstrongswan/utils/fetcher.c
src/libstrongswan/utils/leak_detective.c

index 3c1a913c67a41afb466f7ec2422118b86f5efc9a..0236ba3758107c87ace789c75ebe11f8f8f69556 100644 (file)
@@ -54,6 +54,10 @@ if USE_LEAK_DETECTIVE
   AM_CFLAGS = -DLEAK_DETECTIVE
 endif
 
+if USE_LIBCURL
+  libstrongswan_la_LIBADD += -lcurl
+endif
+
 asn1/oid.c :   asn1/oid.txt asn1/oid.pl
                cd asn1 && $(PERL) oid.pl
 
index e9ccbfd5ed9db18917c0327ea368dbcb5f2bb3ed..1e930a466a51f58ee2f3c8ef6ff0b795f43b3092 100644 (file)
@@ -456,7 +456,6 @@ static int print(FILE *stream, const struct printf_info *info,
        bool utc = TRUE;
        int written = 0;
        const x509_t *cacert;
-       chunk_t keyid;
        
        if (info->alt)
        {
index 6f21aa8dcea254bc3c892ec7a2f9d49fc004d474..cc4910e431ecd1a6b847548d119aa36f82615f26 100644 (file)
@@ -467,7 +467,6 @@ static bool ocsp_parse_basic_response(chunk_t blob, int level0, response_t *res)
 {
        u_int level, version;
        u_int extn_oid = OID_UNKNOWN;
-       u_char buf[BUF_LEN];
        asn1_ctx_t ctx;
        bool critical;
        chunk_t object;
index b14ba16917f1540a4988387fac8e256f1e0f3591..30154f8e1f051d49179e267529b372eb5d62bdee 100644 (file)
@@ -137,7 +137,9 @@ static chunk_t post(private_fetcher_t *this, const char *request_type, chunk_t r
  */
 static void destroy(private_fetcher_t *this)
 {
+#ifdef LIBCURL
        curl_easy_cleanup(this->curl);
+#endif /* LIBCURL */
        free(this);
 }
 
index 3f564b0e2fa1d298b5c83165194b596fde45adeb..b8a0232707637a14cc16faf142494823f50673f4 100644 (file)
@@ -176,8 +176,9 @@ struct whitelist_t {
 };
 
 #ifdef LIBCURL
+/* dummy declaration for whitelisting */
 void *Curl_getaddrinfo(void);
-#endif
+#endif /* LIBCURL */
 
 whitelist_t whitelist[] = {
        {pthread_create,                        2542},
@@ -191,8 +192,10 @@ whitelist_t whitelist[] = {
        {register_printf_function,       159},
        {syslog,                                          45},
        {dlopen,                                         109},
+#      ifdef LIBCURL
        /* from /usr/lib/libcurl.so.3 */
        {Curl_getaddrinfo,                       480},
+#      endif /* LIBCURL */
 };
 
 /**