aboutsummaryrefslogtreecommitdiff
path: root/lib/libc_r/uthread/uthread_socket.c
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>1996-08-20 08:22:01 +0000
committerJulian Elischer <julian@FreeBSD.org>1996-08-20 08:22:01 +0000
commit0f7d684755aefbcfd70b45d24efc2d39bc505c4c (patch)
treeb14348030d1048f8628b798374a8a061a990aae3 /lib/libc_r/uthread/uthread_socket.c
parent1bbb22c82e47dbc805e523be5e2fe3d4436761e0 (diff)
Notes
Diffstat (limited to 'lib/libc_r/uthread/uthread_socket.c')
-rw-r--r--lib/libc_r/uthread/uthread_socket.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc_r/uthread/uthread_socket.c b/lib/libc_r/uthread/uthread_socket.c
index 6265a0583eff..bfc657dfaf5d 100644
--- a/lib/libc_r/uthread/uthread_socket.c
+++ b/lib/libc_r/uthread/uthread_socket.c
@@ -33,6 +33,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <fcntl.h>
+#include <unistd.h>
#ifdef _THREAD_SAFE
#include <pthread.h>
#include "pthread_private.h"
@@ -40,17 +41,16 @@
int
socket(int af, int type, int protocol)
{
- int fd;
- int tmp_flags;
+ int fd;
+ /* Create a socket: */
if ((fd = _thread_sys_socket(af, type, protocol)) < 0) {
+ /* Error creating socket. */
+
+ /* Initialise the entry in the file descriptor table: */
} else if (_thread_fd_table_init(fd) != 0) {
_thread_sys_close(fd);
fd = -1;
- } else {
- tmp_flags = _thread_sys_fcntl(fd, F_GETFL, 0);
- _thread_sys_fcntl(fd, F_SETFL, tmp_flags | O_NONBLOCK);
- _thread_fd_table[fd]->flags = tmp_flags;
}
return (fd);
}