Reland "Cleanup transitive includes in the legacy inlines."

This reverts commit 54c71521b5295f82aaac7aa2f3ce918298fed70f.

Bug: None
Test: make checkbuild
Change-Id: Ica6a4f7ecadfcc854160a60a5db1b44ae3b6c821
diff --git a/libc/include/android/legacy_signal_inlines.h b/libc/include/android/legacy_signal_inlines.h
index 4d474b0..44c2f4f 100644
--- a/libc/include/android/legacy_signal_inlines.h
+++ b/libc/include/android/legacy_signal_inlines.h
@@ -29,16 +29,16 @@
 #ifndef _ANDROID_LEGACY_SIGNAL_INLINES_H_
 #define _ANDROID_LEGACY_SIGNAL_INLINES_H_
 
+#include <sys/cdefs.h>
+
+#if __ANDROID_API__ < __ANDROID_API_L__
+
 #include <errno.h>
 #include <signal.h>
 #include <string.h>
-#include <sys/cdefs.h>
-
 
 __BEGIN_DECLS
 
-#if __ANDROID_API__ < __ANDROID_API_L__
-
 sighandler_t bsd_signal(int __signal, sighandler_t __handler) __REMOVED_IN(21);
 
 /* These weren't introduced until L. */
@@ -117,8 +117,8 @@
   return bsd_signal(s, f);
 }
 
-#endif /* __ANDROID_API__ < __ANDROID_API_L__ */
-
 __END_DECLS
 
+#endif /* __ANDROID_API__ < __ANDROID_API_L__ */
+
 #endif /* _ANDROID_LEGACY_SIGNAL_INLINES_H_ */