summaryrefslogtreecommitdiffstats
path: root/lib/libc_r/uthread/uthread_fd.c
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2001-01-29 03:24:23 +0000
committerdeischen <deischen@FreeBSD.org>2001-01-29 03:24:23 +0000
commitc3dd7e380ee3ca227730ab6a8daa4e35ad4f004e (patch)
tree7ae1ada95686efa301d58e63fe3c182ea5e71404 /lib/libc_r/uthread/uthread_fd.c
parentca55abf319c2f815cb2c84655b25482829c1646d (diff)
downloadFreeBSD-src-c3dd7e380ee3ca227730ab6a8daa4e35ad4f004e.zip
FreeBSD-src-c3dd7e380ee3ca227730ab6a8daa4e35ad4f004e.tar.gz
_exit in libc is now __sys_exit not __sys__exit.
Add another check for thread library initialization (jdp, we really need a way to get _thread_init called at program start before any constructors are run).
Diffstat (limited to 'lib/libc_r/uthread/uthread_fd.c')
-rw-r--r--lib/libc_r/uthread/uthread_fd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libc_r/uthread/uthread_fd.c b/lib/libc_r/uthread/uthread_fd.c
index b5b37c3..ef905e3 100644
--- a/lib/libc_r/uthread/uthread_fd.c
+++ b/lib/libc_r/uthread/uthread_fd.c
@@ -76,6 +76,9 @@ _thread_fd_table_init(int fd)
struct fd_table_entry *entry;
int saved_errno;
+ if (_thread_initial == NULL)
+ _thread_init();
+
/* Check if the file descriptor is out of range: */
if (fd < 0 || fd >= _thread_dtablesize) {
/* Return a bad file descriptor error: */
OpenPOWER on IntegriCloud