Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bladeRF: fix breakage caused by 959bda7, by creating a reverse patch …
…of the commit in issue and reinstating the prior temporary patch that fixed the issue; addresses ticket https://trac.macports.org/ticket/53480 .
- Loading branch information
Showing
3 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- host/CMakeLists.txt.orig | ||
+++ host/CMakeLists.txt | ||
@@ -152,6 +152,11 @@ | ||
${CMAKE_CURRENT_LIST_DIR}/common/include/osx | ||
) | ||
|
||
+ # 'clock_gettime' and related are defined on OSX as of 10.12.0 (16.0.0) | ||
+ if(${CMAKE_SYSTEM_VERSION} VERSION_LESS 16.0.0) | ||
+ add_definitions(-D_OSX_NEED_CLOCK_GETTIME) | ||
+ endif() | ||
+ | ||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
set(BLADERF_OS_WINDOWS 1) | ||
|
||
--- host/common/include/osx/clock_gettime.h.orig | ||
+++ host/common/include/osx/clock_gettime.h | ||
@@ -35,10 +35,12 @@ | ||
# error "This file is intended for use with OSX systems only." | ||
#endif | ||
|
||
+#ifdef _OSX_NEED_CLOCK_GETTIME | ||
typedef int clockid_t; | ||
#define CLOCK_REALTIME 0 | ||
|
||
int clock_gettime(clockid_t clk_id, struct timespec *tp); | ||
+#endif /* _OSX_NEED_CLOCK_GETTIME */ | ||
|
||
#ifdef __cplusplus | ||
} /* extern "C" */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- host/common/include/osx/clock_gettime.h.orig | ||
+++ host/common/include/osx/clock_gettime.h | ||
@@ -27,10 +27,6 @@ | ||
|
||
#include <time.h> | ||
|
||
-#include "AvailabilityMacros.h" | ||
- | ||
-#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12 | ||
- | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
@@ -49,5 +45,3 @@ int clock_gettime(clockid_t clk_id, struct timespec *tp); | ||
#endif | ||
|
||
#endif | ||
- | ||
-#endif | ||
--- host/common/src/osx/clock_gettime.c.orig | ||
+++ host/common/src/osx/clock_gettime.c | ||
@@ -1,7 +1,3 @@ | ||
-#include "AvailabilityMacros.h" | ||
- | ||
-#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12 | ||
- | ||
/* | ||
* clock_gettime() wrapper for OSX based upon jbenet's github "gist": | ||
* https://gist.github.com/jbenet/1087739 | ||
@@ -60,5 +56,3 @@ clock_gettime_out: | ||
return 0; | ||
} | ||
} | ||
- | ||
-#endif |