From: Bartosz Golaszewski Date: Fri, 2 Aug 2019 12:22:29 +0000 (+0200) Subject: tests: mockup: add extern "C" to the header X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=054b77e5ea2f6c9225617224d0e224e25c312f67;p=qemu-gpiodev%2Flibgpiod.git tests: mockup: add extern "C" to the header The gpio-mockup support library should be usable from C++ code too. Add extern "C" to the header. Signed-off-by: Bartosz Golaszewski --- diff --git a/tests/mockup/gpio-mockup.h b/tests/mockup/gpio-mockup.h index d91f3f8..b04dafa 100644 --- a/tests/mockup/gpio-mockup.h +++ b/tests/mockup/gpio-mockup.h @@ -8,6 +8,10 @@ #ifndef __GPIO_MOCKUP_H__ #define __GPIO_MOCKUP_H__ +#ifdef __cplusplus +extern "C" { +#endif + struct gpio_mockup; #define GPIO_MOCKUP_FLAG_NAMED_LINES (1 << 0) @@ -29,4 +33,8 @@ int gpio_mockup_get_value(struct gpio_mockup *ctx, int gpio_mockup_set_pull(struct gpio_mockup *ctx, unsigned int chip_idx, unsigned int line_offset, int pull); +#ifdef __cplusplus +} /* extern "C" */ +#endif + #endif /* __GPIO_MOCKUP_H__ */