diff --git a/daemons/gptp/linux/src/linux_hal_common.cpp b/daemons/gptp/linux/src/linux_hal_common.cpp index cd880ba90e..3be16c8640 100644 --- a/daemons/gptp/linux/src/linux_hal_common.cpp +++ b/daemons/gptp/linux/src/linux_hal_common.cpp @@ -704,9 +704,10 @@ bool LinuxLock::initialize( OSLockType type ) { lock_c = pthread_mutex_init(&_private->mutex,&_private->mta); if(lock_c != 0) { GPTP_LOG_ERROR("Mutex initialization failed - %s",strerror(errno)); - return oslock_fail; + return false; } - return oslock_ok; + + return true; } LinuxLock::~LinuxLock() { diff --git a/daemons/gptp/linux/src/linux_hal_generic_adj.cpp b/daemons/gptp/linux/src/linux_hal_generic_adj.cpp index f722ac4a43..ff445f6871 100644 --- a/daemons/gptp/linux/src/linux_hal_generic_adj.cpp +++ b/daemons/gptp/linux/src/linux_hal_generic_adj.cpp @@ -32,9 +32,12 @@ ******************************************************************************/ #include - // avoid indirect inclusion of time.h since this will clash with linux/timex.h +// linux_hal_generic.hpp pulls in redefinition of struct timespec and timeval +// Below are defines that prevent this: #define _TIME_H 1 #define _STRUCT_TIMEVAL 1 +#define __timeval_defined 1 +#define __timespec_defined 1 #include #include #include