From 7ea54068cf0c57d75aab67e5ed0a45ed143d4912 Mon Sep 17 00:00:00 2001 From: richard Date: Sun, 21 Nov 1999 22:25:53 +0000 Subject: [PATCH] Another attempt to fix availableData git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@5248 72102866-910b-0410-8b05-ffd578937521 --- Source/UnixFileHandle.m | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/Source/UnixFileHandle.m b/Source/UnixFileHandle.m index f58bcc1ca..48c52126b 100644 --- a/Source/UnixFileHandle.m +++ b/Source/UnixFileHandle.m @@ -675,23 +675,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin) } else { - int count; - - /* - * Determine number of bytes readable on descriptor. - */ - if (ioctl(descriptor, FIONREAD, (char*)&count) < 0) - { - [NSException raise: NSFileHandleOperationException - format: @"unable to use FIONREAD on descriptor - %s", - strerror(errno)]; - } - - if (count > sizeof(buf)) - { - count = sizeof(buf); - } - if ((len = read(descriptor, buf, count)) > 0) + if ((len = read(descriptor, buf, sizeof(buf))) > 0) { [d appendBytes: buf length: len]; }