cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl and RedHat 9

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 28 Sep 2004 09:09:56 +0200 (CEST)

On Mon, 27 Sep 2004, Mekonikum wrote:

> I tried to compile curl with c-ares under RedHat9, but I got the following
> error:
>
> gcc -DHAVE_CONFIG_H -I../include -I../lib -I../lib
> -I/usr/local/irc/ircd/ares/include -I/usr/local/irc/ircd/ares/include -g -O2
> -MT url.lo -MD -MP -MF .deps/url.Tpo -c url.c -o url.o
> url.c: In function `Curl_setopt':
> url.c:1115: structure has no member named `engine'
>
> How can I fix this?

Aha. This is a problem when you build curl without SSL support, but your SSL
installation supports Engine. This is a bug in the code. Use this patch to
correct it: (the patch is against CVS, you may need to tweak it slightly to
apply to the curl version you're trying to build)

diff -u -r1.409 url.c
--- lib/url.c 25 Sep 2004 21:28:26 -0000 1.409
+++ lib/url.c 28 Sep 2004 07:09:13 -0000
@@ -1128,7 +1128,7 @@
      {
        const char *cpTemp = va_arg(param, char *);
        if (cpTemp && cpTemp[0]) {
-#ifdef HAVE_OPENSSL_ENGINE_H
+#if defined(USE_SSLEAY) && defined(HAVE_OPENSSL_ENGINE_H)
          ENGINE *e = ENGINE_by_id(cpTemp);
          if (e) {
            if (data->engine) {
@@ -1152,7 +1152,7 @@
      /*
       * flag to set engine as default.
       */
-#ifdef HAVE_OPENSSL_ENGINE_H
+#if defined(USE_SSLEAY) && defined(HAVE_OPENSSL_ENGINE_H)
      if (data->engine) {
        if (ENGINE_set_default(data->engine, ENGINE_METHOD_ALL) > 0) {
  #ifdef DEBUG

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-09-28