diff options
author | John Grossman <johngro@google.com> | 2011-07-13 16:21:11 -0700 |
---|---|---|
committer | Simon Wilson <simonwilson@google.com> | 2011-07-27 14:45:33 -0700 |
commit | ee99f213b29297b1016bc6210c16085c0b3068de (patch) | |
tree | 2ed48ad2a93d267c4b331e8f7b1c2b60992c2871 /include | |
parent | 89b3128f31c99c9678513dceb9d07ed7a677113b (diff) |
include: make it easier to use this header from C++
Add a extern "C" controlled by an #ifdef __cplusplus directive so that this
header can be included from C++ code without having to explicitly control the
linkage.
Diffstat (limited to 'include')
-rw-r--r-- | include/tinyalsa/asoundlib.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/tinyalsa/asoundlib.h b/include/tinyalsa/asoundlib.h index 7b13c0d..8395766 100644 --- a/include/tinyalsa/asoundlib.h +++ b/include/tinyalsa/asoundlib.h @@ -31,6 +31,10 @@ #include <sys/time.h> +#if defined(__cplusplus) +extern "C" { +#endif + /* * PCM API */ @@ -149,4 +153,8 @@ int mixer_ctl_set_enum_by_string(struct mixer_ctl *ctl, const char *string); int mixer_ctl_get_range_min(struct mixer_ctl *ctl); int mixer_ctl_get_range_max(struct mixer_ctl *ctl); +#if defined(__cplusplus) +} /* extern "C" */ +#endif + #endif |