From df4b8adacfc4ee97f76b7abef393b5e186f62178 Mon Sep 17 00:00:00 2001 From: Duane Skelton Date: Mon, 15 Aug 2022 13:49:05 -0700 Subject: [PATCH] Added extern C {} wrapper consistent with other headers in include/sys --- include/sys/utsname.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/sys/utsname.h b/include/sys/utsname.h index 27d5d2be80..3920299cd8 100644 --- a/include/sys/utsname.h +++ b/include/sys/utsname.h @@ -72,10 +72,28 @@ struct utsname char machine[SYS_NAMELEN]; /* Machine hardware */ }; +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + /**************************************************************************** * Public Function Prototypes ****************************************************************************/ int uname(FAR struct utsname *name); +#undef EXTERN +#if defined(__cplusplus) +} +#endif + #endif /* __INCLUDE_SYS_UTSNAME_H */