* Guenter Knauf <[email protected]> wrote:
>
> Hi,
> Jie Gao schrieb:
> >I am getting errors using Sun's compiler:
> well, not sure if it makes much sense to support such a stone-age
> openssl version, even if in your case its patched with all security
> fixes ... :)
> anyway, can you please try if the attached patch fixes the issue for
> you? I've not yet figured out from which version exactly openssl
> starts to use const, but that I do if you report back that it works
That error is now gone. But I've found more errors:
Building shared: mod_dbd.la
/usr/local/src/httpd-2.2.14/srclib/apr/libtool --silent --mode=compile
/opt/SUNWspro/bin/cc -g -fast -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS
-D_REENTRANT -D_LARGEFILE64_SOURCE -DAP_DEBUG
-I/usr/local/src/httpd-2.2.14/srclib/pcre -I.
-I/usr/local/src/httpd-2.2.14/os/unix
-I/usr/local/src/httpd-2.2.14/server/mpm/worker
-I/usr/local/src/httpd-2.2.14/modules/http
-I/usr/local/src/httpd-2.2.14/modules/filters
-I/usr/local/src/httpd-2.2.14/modules/proxy
-I/usr/local/src/httpd-2.2.14/include
-I/usr/local/src/httpd-2.2.14/modules/generators
-I/usr/local/src/httpd-2.2.14/modules/mappers
-I/usr/local/src/httpd-2.2.14/modules/database
-I/usr/local/src/httpd-2.2.14/srclib/apr/include
-I/usr/local/src/httpd-2.2.14/srclib/apr-util/include
-I/usr/local/src/httpd-2.2.14/srclib/apr-util/xml/expat/lib
-I/usr/local/src/httpd-2.2.14/modules/proxy/../generators -I/usr/sfw/include
-I/usr/local/src/httpd-2.2.14/modules/ssl
-I/usr/local/src/httpd-2.2.14/modules/dav/main -prefer-pic -c mod_dbd.c &&
touch mod_dbd.slo
"mod_dbd.c", line 898: warning: argument #1 is incompatible with prototype:
prototype: pointer to function(pointer to struct apr_pool_t {}, pointer
to struct server_rec {pointer to struct process_rec {..} process, pointer to
struct server_rec {..} next, pointer to const char defn_name, unsigned int
defn_line_number, pointer to char server_admin, pointer to char
server_hostname, unsigned short port, pointer to char error_fname, pointer to
struct apr_file_t {..} error_log, int loglevel, int is_virtual, pointer to
struct ap_conf_vector_t {..} module_config, pointer to struct ap_conf_vector_t
{..} lookup_defaults, pointer to struct server_addr_rec {..} addrs, long long
timeout, long long keep_alive_timeout, int keep_alive_max, int keep_alive,
pointer to const char path, int pathlen,
...
/bin/bash /usr/local/src/httpd-2.2.14/srclib/apr/libtool --silent
--mode=compile /opt/SUNWspro/bin/cc -g -fast -DHAVE_CONFIG_H -DSOLARIS2=10
-D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE -I./include
-I/usr/local/src/httpd-2.2.14/srclib/apr/include/arch/unix
-I./include/arch/unix
-I/usr/local/src/httpd-2.2.14/srclib/apr/include/arch/unix
-I/usr/local/src/httpd-2.2.14/srclib/apr/include -o shmem/unix/shm.lo -c
shmem/unix/shm.c && touch shmem/unix/shm.lo
"shmem/unix/shm.c", line 87: warning: statement not reached
"shmem/unix/shm.c", line 218: warning: statement not reached
"shmem/unix/shm.c", line 365: warning: statement not reached
"shmem/unix/shm.c", line 424: warning: statement not reached
"shmem/unix/shm.c", line 455: warning: statement not reached
"shmem/unix/shm.c", line 573: warning: statement not reached
---
Jie
/usr/local/src/httpd-2.2.14/srclib/apr/libtool --silent --mode=compile
/opt/SUNWspro/bin/cc -g -fast -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS
-D_REENTRANT -D_LARGEFILE64_SOURCE -DAP_DEBUG
-I/usr/local/src/httpd-2.2.14/srclib/pcre -I.
-I/usr/local/src/httpd-2.2.14/os/unix
-I/usr/local/src/httpd-2.2.14/server/mpm/worker
-I/usr/local/src/httpd-2.2.14/modules/http
-I/usr/local/src/httpd-2.2.14/modules/filters
-I/usr/local/src/httpd-2.2.14/modules/proxy
-I/usr/local/src/httpd-2.2.14/include
-I/usr/local/src/httpd-2.2.14/modules/generators
-I/usr/local/src/httpd-2.2.14/modules/mappers
-I/usr/local/src/httpd-2.2.14/modules/database
-I/usr/local/src/httpd-2.2.14/srclib/apr/include
-I/usr/local/src/httpd-2.2.14/srclib/apr-util/include
-I/usr/local/src/httpd-2.2.14/srclib/apr-util/xml/expat/lib
-I/usr/local/src/httpd-2.2.14/modules/proxy/../generators -I/usr/sfw/include
-I/usr/local/src/httpd-2.2.14/modules/ssl
-I/usr/local/src/httpd-2.2.14/modules/dav/main -prefer-pic -c ssl_engine_rand.c
&& touch ssl_engine_rand.slo
/usr/local/src/httpd-2.2.14/srclib/apr/libtool --silent --mode=compile
/opt/SUNWspro/bin/cc -g -fast -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS
-D_REENTRANT -D_LARGEFILE64_SOURCE -DAP_DEBUG
-I/usr/local/src/httpd-2.2.14/srclib/pcre -I.
-I/usr/local/src/httpd-2.2.14/os/unix
-I/usr/local/src/httpd-2.2.14/server/mpm/worker
-I/usr/local/src/httpd-2.2.14/modules/http
-I/usr/local/src/httpd-2.2.14/modules/filters
-I/usr/local/src/httpd-2.2.14/modules/proxy
-I/usr/local/src/httpd-2.2.14/include
-I/usr/local/src/httpd-2.2.14/modules/generators
-I/usr/local/src/httpd-2.2.14/modules/mappers
-I/usr/local/src/httpd-2.2.14/modules/database
-I/usr/local/src/httpd-2.2.14/srclib/apr/include
-I/usr/local/src/httpd-2.2.14/srclib/apr-util/include
-I/usr/local/src/httpd-2.2.14/srclib/apr-util/xml/expat/lib
-I/usr/local/src/httpd-2.2.14/modules/proxy/../generators -I/usr/sfw/include
-I/usr/local/src/httpd-2.2.14/modules/ssl
-I/usr/local/src/httpd-2.2.14/modules/dav/main -prefer-pic -c ssl_engine_vars.c
&& touch ssl_engine_vars.slo
"ssl_engine_vars.c", line 656: warning: argument #1 is incompatible with
prototype:
prototype: pointer to struct ssl_cipher_st {int valid, pointer to const
char name, unsigned long id, unsigned long algorithms, unsigned long
algo_strength, unsigned long algorithm2, int strength_bits, int alg_bits,
unsigned long mask, unsigned long mask_strength} :
"/usr/sfw/include/openssl/ssl.h", line 1196
argument : pointer to const struct ssl_cipher_st {int valid, pointer to
const char name, unsigned long id, unsigned long algorithms, unsigned long
algo_strength, unsigned long algorithm2, int strength_bits, int alg_bits,
unsigned long mask, unsigned long mask_strength}
> ...
>
> Günter.
>
>
> Index: ab.c
> ===================================================================
> --- ab.c (revision 818683)
> +++ ab.c (working copy)
> @@ -191,8 +191,10 @@
>
> #if defined(USE_SSL) && (OPENSSL_VERSION_NUMBER >= 0x00909000)
> #define AB_SSL_METHOD_CONST const
> +#define AB_SSL_CIPHER_CONST const
> #else
> #define AB_SSL_METHOD_CONST
> +#define AB_SSL_CIPHER_CONST
> #endif
>
> #include <math.h>
> @@ -486,7 +488,7 @@
>
> static int ssl_print_connection_info(BIO *bio, SSL *ssl)
> {
> - const SSL_CIPHER *c;
> + AB_SSL_CIPHER_CONST SSL_CIPHER *c;
> int alg_bits,bits;
>
> c = SSL_get_current_cipher(ssl);
> @@ -572,7 +574,7 @@
> if (verbosity >= 2)
> ssl_print_info(c);
> if (ssl_info == NULL) {
> - const SSL_CIPHER *ci;
> + AB_SSL_CIPHER_CONST SSL_CIPHER *ci;
> X509 *cert;
> int sk_bits, pk_bits, swork;
>