OSDN Git Service

libubacktrace: use libgcc_s.h
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sat, 23 Feb 2013 08:54:02 +0000 (09:54 +0100)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Thu, 14 Mar 2013 21:49:25 +0000 (22:49 +0100)
for consistency

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
libubacktrace/arm/backtrace.c
libubacktrace/backtrace.c

index 8c8e2a2..c154496 100644 (file)
@@ -12,6 +12,7 @@
  *
  */
 
+#include <libgcc_s.h>
 #include <execinfo.h>
 #include <dlfcn.h>
 #include <stdlib.h>
@@ -34,11 +35,11 @@ static _Unwind_VRS_Result (*unwind_vrs_get) (_Unwind_Context *,
 
 static void backtrace_init (void)
 {
-       void *handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
+       void *handle = dlopen (LIBGCC_S_SO, RTLD_LAZY);
        if (handle == NULL
                || ((unwind_backtrace = dlsym (handle, "_Unwind_Backtrace")) == NULL)
                || ((unwind_vrs_get = dlsym (handle, "_Unwind_VRS_Get")) == NULL)) {
-               printf("libgcc_s.so.1 must be installed for backtrace to work\n");
+               printf(LIBGCC_S_SO " must be installed for backtrace to work\n");
                abort();
        }
 }
index fdd5981..0a72bae 100644 (file)
@@ -20,6 +20,7 @@
  *
  */
 
+#include <libgcc_s.h>
 #include <execinfo.h>
 #include <dlfcn.h>
 #include <stdlib.h>
@@ -38,12 +39,12 @@ static _Unwind_Ptr (*unwind_getip) (struct _Unwind_Context *);
 
 static void backtrace_init (void)
 {
-       void *handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
+       void *handle = dlopen (LIBGCC_S_SO, RTLD_LAZY);
 
        if (handle == NULL
                || ((unwind_backtrace = dlsym (handle, "_Unwind_Backtrace")) == NULL)
                || ((unwind_getip = dlsym (handle, "_Unwind_GetIP")) == NULL)) {
-               printf("libgcc_s.so.1 must be installed for backtrace to work\n");
+               printf(LIBGCC_S_SO " must be installed for backtrace to work\n");
                abort();
        }
 }