From 82f1263db96c9e32f316dbb48d2c44e9e1713019 Mon Sep 17 00:00:00 2001 From: "chao.an" Date: Mon, 21 Sep 2020 11:50:55 +0800 Subject: [PATCH] sys/resource: include-able from C++ files Change-Id: I914ab40495a25da184d0b7f8f8b1fa0d376c66a4 Signed-off-by: chao.an --- include/sys/resource.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/sys/resource.h b/include/sys/resource.h index 83a5d515bd..337a1ca7f3 100644 --- a/include/sys/resource.h +++ b/include/sys/resource.h @@ -115,10 +115,24 @@ struct rusage * Public Function Prototypes ****************************************************************************/ +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + int getpriority(int which, id_t who); int getrlimit(int resource, FAR struct rlimit *rlp); int getrusage(int who, FAR struct rusage *r_usage); int setpriority(int which, id_t who, int value); int setrlimit(int resource, FAR const struct rlimit *rlp); +#undef EXTERN +#if defined(__cplusplus) +} +#endif + #endif /* __INCLUDE_SYS_RESOURCE_H */