'rand' application for creating pseudo-random files.
[openssl.git] / crypto / bio / b_sock.c
index 561d16600495f0ef96702867672319fd65a042e4..6409f98f570071b6e5a3501b5e98ec7cceda2ebe 100644 (file)
@@ -163,7 +163,14 @@ 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(
+#ifndef CONST_STRICT
+                   (char *)
+#endif
+                   str,"tcp");
                if(s != NULL)
                        *port_ptr=ntohs((unsigned short)s->s_port);
                CRYPTO_w_unlock(CRYPTO_LOCK_GETSERVBYNAME);
@@ -327,7 +334,7 @@ static void ghbn_free(struct hostent *a)
                        Free(a->h_addr_list[i]);
                Free(a->h_addr_list);
                }
-       if (a->h_name != NULL) Free((char *)a->h_name);
+       if (a->h_name != NULL) Free(a->h_name);
        Free(a);
        }
 
@@ -368,7 +375,14 @@ 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(
+#ifndef CONST_STRICT
+                   (char *)
+#endif
+                   name);
 
                if (ret == NULL)
                        goto end;