]> git.saurik.com Git - apple/libc.git/blame - stdio/FreeBSD/fwrite.c.patch
Libc-594.9.5.tar.gz
[apple/libc.git] / stdio / FreeBSD / fwrite.c.patch
CommitLineData
3d9156a7
A
1--- fwrite.c.orig 2004-11-01 00:27:25.000000000 -0800
2+++ fwrite.c 2004-11-01 00:29:40.000000000 -0800
3@@ -63,6 +63,11 @@
4
5 iov.iov_base = (void *)buf;
6 uio.uio_resid = iov.iov_len = n = count * size;
7+
8+#if __DARWIN_UNIX03
9+ if (n == 0) /* POSIX */
10+ return 0;
11+#endif /* __DARWIN_UNIX03 */
12 uio.uio_iov = &iov;
13 uio.uio_iovcnt = 1;
14