diff options
-rw-r--r-- | include/ec_commands.h | 8 | ||||
-rw-r--r-- | util/cros_ec_dev.h | 10 |
2 files changed, 17 insertions, 1 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index 736b3bc805..d0b272e8a8 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -12,6 +12,10 @@ #include <stdint.h> #endif +#ifdef __cplusplus +extern "C"{ +#endif + /* * Include common.h for CONFIG_HOSTCMD_ALIGNED, if it's defined. This * generates more efficient code for accessing request/response structures on @@ -5474,4 +5478,8 @@ struct ec_params_charger_control { #endif /* !__ACPI__ */ +#ifdef __cplusplus +} +#endif + #endif /* __CROS_EC_EC_COMMANDS_H */ diff --git a/util/cros_ec_dev.h b/util/cros_ec_dev.h index 7ff87aed9a..85132a8051 100644 --- a/util/cros_ec_dev.h +++ b/util/cros_ec_dev.h @@ -8,7 +8,11 @@ #include <linux/ioctl.h> #include <linux/types.h> -#include "include/ec_commands.h" +#include "ec_commands.h" + +#ifdef __cplusplus +extern "C" { +#endif #define CROS_EC_DEV_NAME "cros_ec" #define CROS_EC_DEV_VERSION "1.0.0" @@ -87,4 +91,8 @@ struct cros_ec_readmem_v2 { struct cros_ec_readmem_v2) #define CROS_EC_DEV_IOCEVENTMASK_V2 _IO(CROS_EC_DEV_IOC_V2, 2) +#ifdef __cplusplus +} +#endif + #endif /* __UTIL_CROS_EC_DEV_H */ |