Fix GCC build.

error: '__sdidinit' initialized and declared 'extern' [-Werror]

Change-Id: I97d9c174da6a99ca61b72572dfb4694813372a60
This commit is contained in:
Elliott Hughes
2015-12-04 15:53:25 -08:00
parent 0b40c13a5a
commit 8766edc098

View File

@@ -287,11 +287,12 @@ extern "C" int getdtablesize() {
}
// A leaked BSD stdio implementation detail that's now a no-op.
extern "C" void __sinit() {
// (GCC doesn't like 'extern "C"' on a definition.)
extern "C" {
void __sinit() {}
int __sdidinit = 1;
}
extern "C" int __sdidinit = 1;
// Only used by ftime, which was removed from POSIX 2008.
struct timeb {
time_t time;