]> git.saurik.com Git - apple/libc.git/blob - stdio/FreeBSD/fwrite.c.patch
5dcd7906e649e094473cda7bab5536d83baf29c2
[apple/libc.git] / stdio / FreeBSD / fwrite.c.patch
1 --- fwrite.c.orig 2009-12-08 00:25:43.000000000 -0800
2 +++ fwrite.c 2009-12-08 00:25:12.000000000 -0800
3 @@ -61,9 +61,10 @@ fwrite(buf, size, count, fp)
4 * ANSI and SUSv2 require a return value of 0 if size or count are 0.
5 */
6 n = count * size;
7 +#if __DARWIN_UNIX03
8 if (n == 0)
9 return (0);
10 -
11 +#endif
12 iov.iov_base = (void *)buf;
13 uio.uio_resid = iov.iov_len = n;
14 uio.uio_iov = &iov;