446cf2
From d4b4586315974d2471486d41891aa9463a5838ad Mon Sep 17 00:00:00 2001
446cf2
From: Florian Weimer <fweimer@redhat.com>
446cf2
Date: Thu, 16 Jul 2020 17:00:46 +0200
446cf2
Subject: [PATCH 05/11] libio: Add fseterr_unlocked for internal use
446cf2
446cf2
Tested-by: Carlos O'Donell <carlos@redhat.com>
446cf2
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
446cf2
---
446cf2
 include/stdio.h | 7 +++++++
446cf2
 1 file changed, 7 insertions(+)
446cf2
446cf2
diff -rup a/include/stdio.h b/include/stdio.h
446cf2
--- a/include/stdio.h	2020-09-14 17:39:06.191727167 -0400
446cf2
+++ b/include/stdio.h	2020-09-14 17:43:44.780222972 -0400
446cf2
@@ -9,6 +9,13 @@
446cf2
 
446cf2
 /* Now define the internal interfaces.  */
446cf2
 
446cf2
+/* Set the error indicator on FP.  */
446cf2
+static inline void
446cf2
+fseterr_unlocked (FILE *fp)
446cf2
+{
446cf2
+  fp->_flags |= _IO_ERR_SEEN;
446cf2
+}
446cf2
+
446cf2
 extern int __fcloseall (void) attribute_hidden;
446cf2
 extern int __snprintf (char *__restrict __s, size_t __maxlen,
446cf2
 		       const char *__restrict __format, ...)