aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/bio
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>2006-04-11 21:34:21 +0000
committerUlf Möller <ulf@openssl.org>2006-04-11 21:34:21 +0000
commit4700aea951dcba9b1e3b724bf4d8f0c712578892 (patch)
treea30eb63c83db7085b9067633de5391267ce74881 /crypto/bio
parent60cdb821db3403481c891b570d163d28f041ec02 (diff)
downloadopenssl-4700aea951dcba9b1e3b724bf4d8f0c712578892.tar.gz
Add BeOS support.
PR: 1312 Submitted by: Oliver Tappe <zooey@hirschkaefer.de> Reviewed by: Ulf Moeller
Diffstat (limited to 'crypto/bio')
-rw-r--r--crypto/bio/b_sock.c11
-rw-r--r--crypto/bio/bss_dgram.c4
2 files changed, 14 insertions, 1 deletions
diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c
index 710a8d6d96..c8ca5923c1 100644
--- a/crypto/bio/b_sock.c
+++ b/crypto/bio/b_sock.c
@@ -84,6 +84,11 @@
static int wsa_init_done=0;
#endif
+#if defined(OPENSSL_SYS_BEOS_BONE)
+/* BONE's IP6 support is incomplete */
+#undef AF_INET6
+#endif
+
#if 0
static unsigned long BIO_ghbn_hits=0L;
static unsigned long BIO_ghbn_miss=0L;
@@ -220,6 +225,10 @@ int BIO_sock_error(int sock)
int j,i;
int size;
+#if defined(OPENSSL_SYS_BEOS_R5)
+ return 0;
+#endif
+
size=sizeof(int);
/* Note: under Windows the third parameter is of type (char *)
* whereas under other systems it is (void *) if you don't have
@@ -799,7 +808,7 @@ int BIO_accept(int sock, char **addr)
if (addr == NULL) goto end;
#ifdef EAI_FAMILY
-# ifdef OPENSSL_SYS_VMS
+# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_BEOS_BONE)
# define SOCKLEN_T size_t
# else
# define SOCKLEN_T socklen_t
diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c
index c21a81dc91..771003e8ac 100644
--- a/crypto/bio/bss_dgram.c
+++ b/crypto/bio/bss_dgram.c
@@ -341,6 +341,7 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
memcpy(&(data->peer), to, sizeof(struct sockaddr));
break;
+#if defined(SO_RCVTIMEO)
case BIO_CTRL_DGRAM_SET_RECV_TIMEOUT:
if ( setsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO, ptr,
sizeof(struct timeval)) < 0)
@@ -351,6 +352,8 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
ptr, (void *)&ret) < 0)
{ perror("getsockopt"); ret = -1; }
break;
+#endif
+#if defined(SO_SNDTIMEO)
case BIO_CTRL_DGRAM_SET_SEND_TIMEOUT:
if ( setsockopt(b->num, SOL_SOCKET, SO_SNDTIMEO, ptr,
sizeof(struct timeval)) < 0)
@@ -361,6 +364,7 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
ptr, (void *)&ret) < 0)
{ perror("getsockopt"); ret = -1; }
break;
+#endif
case BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP:
/* fall-through */
case BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP: