]> git.saurik.com Git - apple/libc.git/blobdiff - stdio/FreeBSD/fdopen.c.patch
Libc-583.tar.gz
[apple/libc.git] / stdio / FreeBSD / fdopen.c.patch
diff --git a/stdio/FreeBSD/fdopen.c.patch b/stdio/FreeBSD/fdopen.c.patch
new file mode 100644 (file)
index 0000000..a94c452
--- /dev/null
@@ -0,0 +1,27 @@
+--- fdopen.c.orig      2009-02-15 03:11:22.000000000 -0800
++++ fdopen.c   2009-02-15 17:52:46.000000000 -0800
+@@ -34,6 +34,15 @@
+  * SUCH DAMAGE.
+  */
++#ifdef VARIANT_DARWINEXTSN
++#define _DARWIN_UNLIMITED_STREAMS
++#define COUNT 0
++#elif defined(VARIANT_LEGACY)
++#define COUNT 0
++#else
++#define COUNT 1
++#endif
++
+ #if defined(LIBC_SCCS) && !defined(lint)
+ static char sccsid[] = "@(#)fdopen.c  8.1 (Berkeley) 6/4/93";
+ #endif /* LIBC_SCCS and not lint */
+@@ -73,7 +82,7 @@ fdopen(fd, mode)
+               return (NULL);
+       }
+-      if ((fp = __sfp()) == NULL)
++      if ((fp = __sfp(COUNT)) == NULL)
+               return (NULL);
+       fp->_flags = flags;
+       /*