From d9c9ebe6de1e6f255d645dd6e641f2c288238bc2 Mon Sep 17 00:00:00 2001 From: mwturvey Date: Thu, 16 Mar 2017 10:42:56 -0700 Subject: fix linux build --- include/libsurvive/survive.h | 4 +++- src/survive.c | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/libsurvive/survive.h b/include/libsurvive/survive.h index 3bc3b33..eb30252 100644 --- a/include/libsurvive/survive.h +++ b/include/libsurvive/survive.h @@ -136,11 +136,13 @@ void survive_default_angle_process( SurviveObject * so, int sensor_id, int acode ////////////////////// Survive Drivers //////////////////////////// +void RegisterDriver( const char * name, void * data ); + #ifdef _WIN32 #define REGISTER_LINKTIME( func ) #else #define REGISTER_LINKTIME( func ) \ - void __attribute__((constructor)) LTRegister##func() { RegisterDriver(#func, &func); } + void __attribute__((constructor)) REGISTER##func() { RegisterDriver(#func, &func); } #endif diff --git a/src/survive.c b/src/survive.c index d7aa691..9d0ef01 100755 --- a/src/survive.c +++ b/src/survive.c @@ -14,8 +14,7 @@ static int did_runtime_symnum; int SymnumCheck( const char * path, const char * name, void * location, long size ) { - printf("%s\n", name); - if( strncmp( name, "LTRegister", 8 ) == 0 ) + if( strncmp( name, "REGISTER", 8 ) == 0 ) { typedef void (*sf)(); sf fn = (sf)location; -- cgit v1.2.3