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/local.h b/libc/stdio/local.h
index 13188ee..46b11f1 100644
--- a/libc/stdio/local.h
+++ b/libc/stdio/local.h
@@ -41,6 +41,8 @@
#include "wcio.h"
#include "fileext.h"
+__BEGIN_DECLS
+
/*
* Android <= KitKat had getc/putc macros in <stdio.h> that referred
* to __srget/__swbuf, so those symbols need to be public for LP32
@@ -137,3 +139,5 @@
wint_t __fputwc_unlock(wchar_t wc, FILE *fp);
#pragma GCC visibility pop
+
+__END_DECLS