summaryrefslogtreecommitdiffstats
path: root/gcc45-java-FIONREAD.diff
blob: 3086e1bdd57886629c5634aa6083c0212f0e540b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35536

--- origsrc/gcc-4.5.1/libjava/gnu/java/nio/channels/natFileChannelPosix.cc	2007-04-02 20:05:50.000000000 -0500
+++ src/gcc-4.5.1/libjava/gnu/java/nio/channels/natFileChannelPosix.cc	2010-10-27 13:39:34.044718100 -0500
@@ -386,7 +386,7 @@ FileChannelImpl::available (void)
 
 #if defined (FIONREAD)
   r = ::ioctl (fd, FIONREAD, &num);
-  if (r == -1 && errno == ENOTTY)
+  if (r == -1 && (errno == ENOTTY || errno == EINVAL))
     {
       // If the ioctl doesn't work, we don't care.
       r = 0;