]> git.saurik.com Git - apple/libc.git/blame - stdio/FreeBSD/wbuf.c.patch
Libc-498.1.5.tar.gz
[apple/libc.git] / stdio / FreeBSD / wbuf.c.patch
CommitLineData
3d9156a7
A
1--- wbuf.c.orig 2004-06-07 22:45:32.000000000 -0700
2+++ wbuf.c 2004-10-25 00:49:10.000000000 -0700
51631861 3@@ -41,6 +41,7 @@
3d9156a7 4 __FBSDID("$FreeBSD: src/lib/libc/stdio/wbuf.c,v 1.11 2004/06/08 05:45:32 das Exp $");
51631861
A
5
6 #include <stdio.h>
7+#include <errno.h>
8 #include "local.h"
9
10 /*
11@@ -65,8 +66,10 @@
12 * calls might wrap _w from negative to positive.
13 */
14 fp->_w = fp->_lbfsize;
3d9156a7
A
15- if (prepwrite(fp) != 0)
16+ if (prepwrite(fp) != 0) {
51631861
A
17+ errno = EBADF;
18 return (EOF);
19+ }
20 c = (unsigned char)c;
21
22 ORIENT(fp, -1);