diff options
author | Levi Pearson <levipearson@gmail.com> | 2017-10-11 10:35:20 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-11 10:35:20 -0600 |
commit | 1519f1c4084fc47edf7a6adcf562ac4edd825ea5 (patch) | |
tree | d05d0d33a2fa26c7c5c6375f383ef1d5254fe053 | |
parent | 267bb1de6e7adccd2a7d5269070233c71f0a4095 (diff) | |
parent | ba94f00b69e8f235fb4d8994e0db8ab04a5717f0 (diff) | |
download | Open-AVB-1519f1c4084fc47edf7a6adcf562ac4edd825ea5.tar.gz |
Merge pull request #707 from christopher-s-hall/open-avb-next
RFC: Simplify timeval & timespec redefinition fix
-rw-r--r-- | daemons/gptp/linux/src/linux_hal_common.hpp | 2 | ||||
-rw-r--r-- | daemons/gptp/linux/src/linux_hal_generic_adj.cpp | 9 |
2 files changed, 3 insertions, 8 deletions
diff --git a/daemons/gptp/linux/src/linux_hal_common.hpp b/daemons/gptp/linux/src/linux_hal_common.hpp index 28332f01..9eb3ddc9 100644 --- a/daemons/gptp/linux/src/linux_hal_common.hpp +++ b/daemons/gptp/linux/src/linux_hal_common.hpp @@ -306,7 +306,7 @@ public: OSLock * createLock( OSLockType type ) const { LinuxLock *lock = new LinuxLock(); - if (lock->initialize(type) != oslock_ok) { + if (!lock->initialize(type)) { delete lock; lock = NULL; } diff --git a/daemons/gptp/linux/src/linux_hal_generic_adj.cpp b/daemons/gptp/linux/src/linux_hal_generic_adj.cpp index ff445f68..7f1d59c8 100644 --- a/daemons/gptp/linux/src/linux_hal_generic_adj.cpp +++ b/daemons/gptp/linux/src/linux_hal_generic_adj.cpp @@ -31,13 +31,8 @@ ******************************************************************************/ -#include <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 <sys/timex.h> +#define ADJ_SETOFFSET 0x0100 // Missing from older header files #include <linux_hal_generic.hpp> #include <syscall.h> #include <math.h> |