diff options
author | Dave Watson <davejwatson@fb.com> | 2019-04-11 09:04:03 -0700 |
---|---|---|
committer | Dave Watson <davejwatson@fb.com> | 2019-04-11 09:04:03 -0700 |
commit | 1b1cd9fe54327542577df7b880a8f4cf7eee3b1a (patch) | |
tree | e36e5ba22a003108a67d98cc07abb1becd6766fc | |
parent | f2931b349c1d00f8539fc989d32f8ff270e4f7a0 (diff) | |
download | libunwind-1b1cd9fe54327542577df7b880a8f4cf7eee3b1a.tar.gz |
x86_64: Fix tdep_init_done when built with libatomic_ops
Use correct size variable.
-rw-r--r-- | include/tdep-x86_64/libunwind_i.h | 4 | ||||
-rw-r--r-- | src/x86_64/Gglobal.c | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/tdep-x86_64/libunwind_i.h b/include/tdep-x86_64/libunwind_i.h index 283525c1..93d925f2 100644 --- a/include/tdep-x86_64/libunwind_i.h +++ b/include/tdep-x86_64/libunwind_i.h @@ -232,7 +232,11 @@ dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val) #define tdep_get_ip(c) ((c)->dwarf.ip) #define tdep_big_endian(as) 0 +#ifdef HAVE_ATOMIC_OPS_H +extern AO_t tdep_init_done; +#else extern int tdep_init_done; +#endif extern void tdep_init (void); extern void tdep_init_mem_validate (void); diff --git a/src/x86_64/Gglobal.c b/src/x86_64/Gglobal.c index d0560582..9a7b1957 100644 --- a/src/x86_64/Gglobal.c +++ b/src/x86_64/Gglobal.c @@ -30,7 +30,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "dwarf_i.h" HIDDEN define_lock (x86_64_lock); -HIDDEN sig_atomic_t tdep_init_done; +#ifdef HAVE_ATOMIC_OPS_H + HIDDEN AO_t tdep_init_done; +#else + HIDDEN int tdep_init_done; +#endif /* See comments for svr4_dbx_register_map[] in gcc/config/i386/i386.c. */ |