SOCKETSHR is showing bad declarations again. However, a simple cast
authorRichard Levitte <levitte@openssl.org>
Mon, 17 Jan 2000 01:07:36 +0000 (01:07 +0000)
committerRichard Levitte <levitte@openssl.org>
Mon, 17 Jan 2000 01:07:36 +0000 (01:07 +0000)
which does no harm fixes that problem.

crypto/bio/b_sock.c

index 561d16600495f0ef96702867672319fd65a042e4..dce0c0390bba3e34e8e37e4d64807c13685bda43 100644 (file)
@@ -163,7 +163,10 @@ int BIO_get_port(const char *str, unsigned short *port_ptr)
        else
                {
                CRYPTO_w_lock(CRYPTO_LOCK_GETSERVBYNAME);
-               s=getservbyname(str,"tcp");
+               /* Note: under VMS with SOCKETSHR, it seems like the first
+                * parameter is 'char *', instead of 'const char *'
+                */
+               s=getservbyname((char *)str,"tcp");
                if(s != NULL)
                        *port_ptr=ntohs((unsigned short)s->s_port);
                CRYPTO_w_unlock(CRYPTO_LOCK_GETSERVBYNAME);
@@ -368,7 +371,10 @@ struct hostent *BIO_gethostbyname(const char *name)
        if (i == GHBN_NUM) /* no hit*/
                {
                BIO_ghbn_miss++;
-               ret=gethostbyname(name);
+               /* Note: under VMS with SOCKETSHR, it seems like the first
+                * parameter is 'char *', instead of 'const char *'
+                */
+               ret=gethostbyname((char *)name);
 
                if (ret == NULL)
                        goto end;