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
This commit is contained in:
@@ -32,6 +32,10 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/*
|
||||
* The first few FILEs are statically allocated; others are dynamically
|
||||
* allocated and linked in via this glue structure.
|
||||
@@ -44,3 +48,5 @@ struct glue {
|
||||
|
||||
/* This was referenced by a couple of different pieces of middleware and the Crystax NDK. */
|
||||
__LIBC64_HIDDEN__ extern struct glue __sglue;
|
||||
|
||||
__END_DECLS
|
||||
|
Reference in New Issue
Block a user