Fix flockfile(3) and friends for stdin/stdout/stderr too.
stdin/stdout/stderr are special; their mutexes are initialized by
__sinit. There's no unit test for this, because __sinit has already
been called by the time the first unit test runs, but you could
reproduce this failure with a trivial main() that calls flockfile
or ftrylockfile on one of the standard streams before otherwise
using stdio.
Bug: 18208568
Change-Id: I28d232cf05a9f198a2bed61854d8047b23d2091d
diff --git a/libc/stdio/fileext.h b/libc/stdio/fileext.h
index dc89fff..25b7bda 100644
--- a/libc/stdio/fileext.h
+++ b/libc/stdio/fileext.h
@@ -34,6 +34,8 @@
#include <pthread.h>
+__BEGIN_DECLS
+
/*
* file extension
*/
@@ -61,4 +63,6 @@
_FILEEXT_INIT(f); \
} while (0)
+__END_DECLS
+
#endif /* _FILEEXT_H_ */