Skip to content

Commit

Permalink
Fixes for compile breakage encountered in Fedora 26
Browse files Browse the repository at this point in the history
Fixes incorrect return type in LinuxLock::initialize()
  • Loading branch information
christopher-s-hall committed Oct 9, 2017
1 parent fe0455b commit e6aa0fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions daemons/gptp/linux/src/linux_hal_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
5 changes: 4 additions & 1 deletion daemons/gptp/linux/src/linux_hal_generic_adj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@
******************************************************************************/

#include <linux/timex.h>
// 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 <linux_hal_generic.hpp>
#include <syscall.h>
#include <math.h>
Expand Down

0 comments on commit e6aa0fc

Please sign in to comment.