Added extern C {} wrapper consistent with other headers in include/sys

This commit is contained in:
Duane Skelton
2022-08-16 12:04:01 +08:00
committed by Xiang Xiao
parent beb9144141
commit df4b8adacf
+18
View File
@@ -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 */