From a3575f3c60feec114f079de83a18a60ce85859b4 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 23 Sep 2019 18:58:12 +0200 Subject: [PATCH] LibC: Fix warnings in sys/cdefs.h if __BEGIN_DECLS is already defined --- Libraries/LibC/sys/cdefs.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Libraries/LibC/sys/cdefs.h b/Libraries/LibC/sys/cdefs.h index f83fbad3c2..542509a949 100644 --- a/Libraries/LibC/sys/cdefs.h +++ b/Libraries/LibC/sys/cdefs.h @@ -7,11 +7,15 @@ #endif #ifdef __cplusplus -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS } +# ifndef __BEGIN_DECLS +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } +# endif #else -# define __BEGIN_DECLS -# define __END_DECLS +# ifndef __BEGIN_DECLS +# define __BEGIN_DECLS +# define __END_DECLS +# endif #endif #undef __P