Submitted By: Agathoklis Hatzimanikas (ag at linuxfromscratch dot org)
Date: 2008-12-27
Initial Package Version: 1.4.9
Origin: Upstream
Upstream Status: Applied
Description: Fixes compilation problem, when curl is already installed
	     and was linked against a SSL/TLS library

diff -Naur gnupg-1.4.9.orig/keyserver/gpgkeys_curl.c gnupg-1.4.9/keyserver/gpgkeys_curl.c
--- gnupg-1.4.9.orig/keyserver/gpgkeys_curl.c	2007-10-23 12:59:12.000000000 +0300
+++ gnupg-1.4.9/keyserver/gpgkeys_curl.c	2008-12-27 12:26:31.535652390 +0200
@@ -1,5 +1,5 @@
 /* gpgkeys_curl.c - fetch a key via libcurl
- * Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ * Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
  *
  * This file is part of GnuPG.
  *
@@ -42,7 +42,6 @@
 #else
 #include "curl-shim.h"
 #endif
-#include "compat.h"
 #include "keyserver.h"
 #include "ksutil.h"
 
@@ -203,13 +202,13 @@
 
 	  option[MAX_OPTION]='\0';
 
-	  if(ascii_strncasecmp(option,"no-",3)==0)
+	  if(strncasecmp(option,"no-",3)==0)
 	    {
 	      no=1;
 	      start=&option[3];
 	    }
 
-	  if(ascii_strncasecmp(start,"http-proxy",10)==0)
+	  if(strncasecmp(start,"http-proxy",10)==0)
 	    {
 	      /* Safe to not check the return code of strdup() here.
 		 If it fails, we simply won't use a proxy. */
@@ -227,7 +226,7 @@
 		    }
 		}
 	    }
-	  else if(ascii_strncasecmp(start,"follow-redirects",16)==0)
+	  else if(strncasecmp(start,"follow-redirects",16)==0)
 	    {
 	      if(no)
 		follow_redirects=0;
@@ -274,7 +273,7 @@
      print a nicer error message. */
   curldata=curl_version_info(CURLVERSION_NOW);
   for(i=0;curldata->protocols[i];i++)
-    if(ascii_strcasecmp(curldata->protocols[i],opt->scheme)==0)
+    if(strcasecmp(curldata->protocols[i],opt->scheme)==0)
       break;
 
   if(curldata->protocols[i]==NULL)
@@ -286,7 +285,7 @@
 
   if(follow_redirects)
     {
-      curl_easy_setopt(curl,CURLOPT_FOLLOWLOCATION,1);
+      curl_easy_setopt(curl,CURLOPT_FOLLOWLOCATION,1L);
       if(follow_redirects>0)
 	curl_easy_setopt(curl,CURLOPT_MAXREDIRS,follow_redirects);
     }
@@ -298,10 +297,10 @@
     {
       fprintf(console,"gpgkeys: curl version = %s\n",curl_version());
       curl_easy_setopt(curl,CURLOPT_STDERR,console);
-      curl_easy_setopt(curl,CURLOPT_VERBOSE,1);
+      curl_easy_setopt(curl,CURLOPT_VERBOSE,1L);
     }
 
-  curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,opt->flags.check_cert);
+  curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,(long)opt->flags.check_cert);
   curl_easy_setopt(curl,CURLOPT_CAINFO,opt->ca_cert_file);
 
   if(proxy)
