Skip to content

Commit

Permalink
Fix haxpor#14
Browse files Browse the repository at this point in the history
- according to what @happyfire has found and pushed effort in fixing,
  and let us knew in discussion. The fixed went along with that route.
  • Loading branch information
haxpor committed Apr 1, 2017
1 parent d74e711 commit efe72da
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions PacketProcessor/tun2socks-iOS/system/BTime.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct _BTime_global btime_global = {
#include <mach/clock.h>
#include <mach/mach.h>

/*int clock_gettime(int clk_id, struct timespec* t)
int clock_gettime_ex(int clk_id, struct timespec* t)
{
clock_serv_t cclock;
mach_timespec_t mts;
Expand All @@ -51,5 +51,5 @@ struct _BTime_global btime_global = {
t->tv_sec = mts.tv_sec;
t->tv_nsec = mts.tv_nsec;
return 0;
}*/
}
#endif
4 changes: 2 additions & 2 deletions PacketProcessor/tun2socks-iOS/system/BTime.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct _BTime_global {

#ifdef __MACH__
#define CLOCK_MONOTONIC 1
//int clock_gettime(int clk_id, struct timespec* t);
int clock_gettime_ex(int clk_id, struct timespec* t);
#endif

extern struct _BTime_global btime_global;
Expand All @@ -91,7 +91,7 @@ static void BTime_Init (void)
#else

struct timespec ts;
if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0) {
if (clock_gettime_ex(CLOCK_MONOTONIC, &ts) < 0) {
BLog(BLOG_WARNING, "CLOCK_MONOTONIC is not available. Timers will be confused by clock changes.");

struct timeval tv;
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ Be warned that you **should not** call `pod update` as newer version of pod fram
3. `carthage update` to pull down dependencies into `Carthage/Checkouts` folder and build each one
4. Open `Potatso.xcworkspace` then Build and Run the project. Done.

## Build Notices

If you try to build for iOS 10.3, please try to use XCode Version 8.3 (8E162) onwards and only for release version.

## Code Notices

There're a couple of issues that needed to look at, but at tested, it doen **not** effect the functionality of the app.
Expand Down

0 comments on commit efe72da

Please sign in to comment.