Selaa lähdekoodia

LibC: Fix warnings in sys/cdefs.h if __BEGIN_DECLS is already defined

Andreas Kling 5 vuotta sitten
vanhempi
commit
a3575f3c60
1 muutettua tiedostoa jossa 8 lisäystä ja 4 poistoa
  1. 8 4
      Libraries/LibC/sys/cdefs.h

+ 8 - 4
Libraries/LibC/sys/cdefs.h

@@ -7,11 +7,15 @@
 #endif
 #endif
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
-#    define __BEGIN_DECLS extern "C" {
-#    define __END_DECLS }
+#    ifndef __BEGIN_DECLS
+#        define __BEGIN_DECLS extern "C" {
+#        define __END_DECLS }
+#    endif
 #else
 #else
-#    define __BEGIN_DECLS
-#    define __END_DECLS
+#    ifndef __BEGIN_DECLS
+#        define __BEGIN_DECLS
+#        define __END_DECLS
+#    endif
 #endif
 #endif
 
 
 #undef __P
 #undef __P