From ddb128bbf74570addd7296afcf9e42eaabff8698 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Sun, 30 Jul 2023 07:55:28 -0500 Subject: [PATCH] Make fifo.c thread safe --- include/hamlib/rig.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index ad57c3390..458ef51d2 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -137,6 +137,11 @@ typedef struct int head; int tail; int flush; // flush flag for stop_morse +#if _PTHREAD_H + pthread_mutex_t mutex; +#else + int mutex; +#endif } FIFO_RIG;