diff options
author | Chris Robinson <[email protected]> | 2017-10-07 14:58:35 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-10-07 14:58:35 -0700 |
commit | b3f7df6f5b0ce84937989c4b8fbbbce88bc9cebb (patch) | |
tree | 5b8c534babeabd0c08bb02a4176f40c46f46f723 | |
parent | d57eca57a93a78f9d04de0bc562319dcff6ccbc7 (diff) |
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.
-rw-r--r-- | router/al.c | 2 | ||||
-rw-r--r-- | 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 { |