summaryrefslogtreecommitdiffstats
path: root/ssl/bio_ssl.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2000-01-18 09:30:51 +0000
committerRichard Levitte <levitte@openssl.org>2000-01-18 09:30:51 +0000
commita9188d4e173304948c7711566556602bfb3ee32f (patch)
treee9b4a390ef9692cc6212c8f1ae60a82cc8854f33 /ssl/bio_ssl.c
parentea5e7bcf632bba51618ab9407409b24cc4df8fa0 (diff)
Compaq C 6.2 for VMS will complain when we want to convert
non-function pointers to function pointers and vice versa. The current solution is to have unions that describe the conversion we want to do, and gives us the ability to extract the type of data we want. The current solution is a quick fix, and can probably be made in a more general or elegant way.
Diffstat (limited to 'ssl/bio_ssl.c')
-rw-r--r--ssl/bio_ssl.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/ssl/bio_ssl.c b/ssl/bio_ssl.c
index f62cde4e5d..aa296996e6 100644
--- a/ssl/bio_ssl.c
+++ b/ssl/bio_ssl.c
@@ -94,6 +94,12 @@ static BIO_METHOD methods_sslp=
ssl_free,
};
+union void_fn_to_char_u
+ {
+ char *char_p;
+ void (*fn_p)();
+ };
+
BIO_METHOD *BIO_f_ssl(void)
{
return(&methods_sslp);
@@ -444,7 +450,12 @@ static long ssl_ctrl(BIO *b, int cmd, long num, char *ptr)
ret=BIO_ctrl(ssl->rbio,cmd,num,ptr);
break;
case BIO_CTRL_SET_CALLBACK:
- SSL_set_info_callback(ssl,(void (*)())ptr);
+ {
+ union void_fn_to_char_u tmp_cb;
+
+ tmp_cb.char_p = ptr;
+ SSL_set_info_callback(ssl,tmp_cb.fn_p);
+ }
break;
case BIO_CTRL_GET_CALLBACK:
{