From b3f7df6f5b0ce84937989c4b8fbbbce88bc9cebb Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 7 Oct 2017 14:58:35 -0700 Subject: [PATCH] Use a typedef to declare extern atomic variables Some systems use anonymous structs for atomic storage, and extern declarations need to have the same type as their non-extern definition. --- router/al.c | 2 +- router/router.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/router/al.c b/router/al.c index 3349ad13..8dd888d9 100644 --- a/router/al.c +++ b/router/al.c @@ -7,7 +7,7 @@ #include "router.h" -ATOMIC(DriverIface*) CurrentCtxDriver = ATOMIC_INIT_STATIC(NULL); +atomic_DriverIfacePtr CurrentCtxDriver = ATOMIC_INIT_STATIC(NULL); #define DECL_THUNK1(R,n,T1) AL_API R AL_APIENTRY n(T1 a) \ { \ diff --git a/router/router.h b/router/router.h index ee885d85..32a91dcb 100644 --- a/router/router.h +++ b/router/router.h @@ -137,7 +137,8 @@ extern DriverIface *DriverList; extern int DriverListSize; extern altss_t ThreadCtxDriver; -extern ATOMIC(DriverIface*) CurrentCtxDriver; +typedef ATOMIC(DriverIface*) atomic_DriverIfacePtr; +extern atomic_DriverIfacePtr CurrentCtxDriver; typedef struct PtrIntMap {