fix windows build

thread_defs.h gets included by the windows host libandroidfw build,
which does not have sys/cdefs.h or BEGIN_DECLS.  Switch to using
extern "C" manually.

Change-Id: I363e6f2d3a64c5efeff54049a2e5dab080fd4715
diff --git a/include/system/thread_defs.h b/include/system/thread_defs.h
index 30fe564..f4d6a57 100644
--- a/include/system/thread_defs.h
+++ b/include/system/thread_defs.h
@@ -17,10 +17,11 @@
 #ifndef ANDROID_THREAD_DEFS_H
 #define ANDROID_THREAD_DEFS_H
 
-#include <sys/cdefs.h>
 #include "graphics.h"
 
-__BEGIN_DECLS
+#if defined(__cplusplus)
+extern "C" {
+#endif
 
 enum {
     /*
@@ -69,6 +70,8 @@
     ANDROID_PRIORITY_LESS_FAVORABLE = +1,
 };
 
-__END_DECLS
+#if defined(__cplusplus)
+}
+#endif
 
 #endif /* ANDROID_THREAD_DEFS_H */