diff options
Diffstat (limited to 'src/lib/libcrypto/bio/b_sock.c')
| -rw-r--r-- | src/lib/libcrypto/bio/b_sock.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/lib/libcrypto/bio/b_sock.c b/src/lib/libcrypto/bio/b_sock.c index 92a62b2c4c..ece88277df 100644 --- a/src/lib/libcrypto/bio/b_sock.c +++ b/src/lib/libcrypto/bio/b_sock.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: b_sock.c,v 1.60 2014/12/03 21:55:51 bcook Exp $ */ | 1 | /* $OpenBSD: b_sock.c,v 1.61 2014/12/03 22:14:38 bcook Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -65,7 +65,6 @@ | |||
| 65 | #include <netinet/tcp.h> | 65 | #include <netinet/tcp.h> |
| 66 | 66 | ||
| 67 | #include <errno.h> | 67 | #include <errno.h> |
| 68 | #include <fcntl.h> | ||
| 69 | #include <limits.h> | 68 | #include <limits.h> |
| 70 | #include <netdb.h> | 69 | #include <netdb.h> |
| 71 | #include <stdio.h> | 70 | #include <stdio.h> |
| @@ -194,17 +193,6 @@ BIO_gethostbyname(const char *name) | |||
| 194 | } | 193 | } |
| 195 | 194 | ||
| 196 | int | 195 | int |
| 197 | BIO_sock_init(void) | ||
| 198 | { | ||
| 199 | return (1); | ||
| 200 | } | ||
| 201 | |||
| 202 | void | ||
| 203 | BIO_sock_cleanup(void) | ||
| 204 | { | ||
| 205 | } | ||
| 206 | |||
| 207 | int | ||
| 208 | BIO_socket_ioctl(int fd, long type, void *arg) | 196 | BIO_socket_ioctl(int fd, long type, void *arg) |
| 209 | { | 197 | { |
| 210 | int ret; | 198 | int ret; |
| @@ -454,14 +442,3 @@ BIO_set_tcp_ndelay(int s, int on) | |||
| 454 | { | 442 | { |
| 455 | return (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)) == 0); | 443 | return (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)) == 0); |
| 456 | } | 444 | } |
| 457 | |||
| 458 | int | ||
| 459 | BIO_socket_nbio(int s, int mode) | ||
| 460 | { | ||
| 461 | int flags = fcntl(s, F_GETFD); | ||
| 462 | if (mode && !(flags & O_NONBLOCK)) | ||
| 463 | return (fcntl(s, F_SETFL, flags | O_NONBLOCK) != -1); | ||
| 464 | else if (!mode && (flags & O_NONBLOCK)) | ||
| 465 | return (fcntl(s, F_SETFL, flags & ~O_NONBLOCK) != -1); | ||
| 466 | return (1); | ||
| 467 | } | ||
