From ff9697bab4d520588dae350de9b8a700c8af18a0 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Mon, 1 Jun 2020 06:44:09 +0200 Subject: [PATCH] fix: linking with cpp code (#95) * fix: linking with cpp code * fix: make Handler_Transmit_Buffer always available --- src/bacnet/basic/tsm/tsm.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/bacnet/basic/tsm/tsm.h b/src/bacnet/basic/tsm/tsm.h index ed3dec74..ff6193c2 100644 --- a/src/bacnet/basic/tsm/tsm.h +++ b/src/bacnet/basic/tsm/tsm.h @@ -21,8 +21,8 @@ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *********************************************************************/ -#ifndef TSM_H -#define TSM_H +#ifndef BACNET_BASIC_TSM_TSM_H +#define BACNET_BASIC_TSM_TSM_H #include #include @@ -35,9 +35,18 @@ /* note: TSM functionality is optional - only needed if we are doing client requests */ -/* FIXME: modify basic service handlers to use TSM rather than this buffer! */ -BACNET_STACK_EXPORT extern -uint8_t Handler_Transmit_Buffer[MAX_PDU]; +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + /* FIXME: modify basic service handlers to use TSM rather than this buffer! */ + BACNET_STACK_EXPORT extern + uint8_t Handler_Transmit_Buffer[MAX_PDU]; + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #if (!MAX_TSM_TRANSACTIONS) #define tsm_free_invoke_id(x) (void)x;