xcode framework build updates
This commit is contained in:
@@ -40,8 +40,9 @@ extern "C" {
|
||||
#define INTERCEPT_DISABLED 222
|
||||
|
||||
extern void load_symbols();
|
||||
void zt_init_rpc(char *path, char *nwid);
|
||||
extern void zt_init_rpc(const char *path, const char *nwid);
|
||||
extern char *api_netpath;
|
||||
extern char *debug_logfile;
|
||||
|
||||
#if defined(__linux__)
|
||||
extern int (*realaccept4)(ACCEPT4_SIG);
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
#include <fcntl.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#ifndef SDK_DEBUG_H
|
||||
#define SDK_DEBUG_H
|
||||
|
||||
// Set during make (e.g. make SDK_DEBUG=2)
|
||||
#define DEBUG_LEVEL 5
|
||||
|
||||
@@ -51,7 +54,7 @@
|
||||
#define MSG_DEBUG 4 // Information which is only useful to someone debugging
|
||||
#define MSG_DEBUG_EXTRA 5 // If nothing in your world makes sense
|
||||
|
||||
char *debug_logfile = (char*)0;
|
||||
//char *debug_logfile = (char*)0;
|
||||
void dwr(int level, const char *fmt, ... );
|
||||
|
||||
void dwr(int level, const char *fmt, ... )
|
||||
@@ -78,6 +81,7 @@ void dwr(int level, const char *fmt, ... )
|
||||
if(!debug_logfile) { // Try to get logfile from env
|
||||
debug_logfile = getenv("ZT_SDK_LOGFILE");
|
||||
}
|
||||
/*
|
||||
if(debug_logfile) {
|
||||
FILE *file = fopen(debug_logfile,"a");
|
||||
fprintf(file, "%s [tid=%7d] ", timestring, tid);
|
||||
@@ -85,6 +89,7 @@ void dwr(int level, const char *fmt, ... )
|
||||
fclose(file);
|
||||
va_end(ap);
|
||||
}
|
||||
*/
|
||||
#endif
|
||||
va_start(ap, fmt);
|
||||
fprintf(stderr, "%s [tid=%7d] ", timestring, tid);
|
||||
@@ -116,4 +121,6 @@ extern "C" {
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -47,6 +47,8 @@
|
||||
#include "OSUtils.hpp"
|
||||
|
||||
#include "SDK.h"
|
||||
void zt_init_rpc(const char * path, const char * nwid);
|
||||
|
||||
#include "SDK_Debug.h"
|
||||
#include "SDK_ServiceSetup.hpp"
|
||||
|
||||
@@ -57,7 +59,6 @@ pthread_key_t thr_id_key;
|
||||
static ZeroTier::OneService *volatile zt1Service;
|
||||
std::string homeDir;
|
||||
std::string netDir;
|
||||
char *api_netpath;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -134,10 +135,8 @@ extern "C" {
|
||||
JNIEXPORT void JNICALL Java_ZeroTier_SDK_startOneService(JNIEnv *env, jobject thisObj, jstring path) {
|
||||
//char * path;
|
||||
homeDir = (*env)->GetStringUTFChars(env, path, NULL);
|
||||
|
||||
#else
|
||||
void *startOneService(void *thread_id, string path) {
|
||||
homeDir = path;
|
||||
void *startOneService(void *thread_id) {
|
||||
#endif
|
||||
|
||||
#if defined(SDK_BUNDLED)
|
||||
@@ -159,7 +158,6 @@ extern "C" {
|
||||
#if defined(__UNITY_3D__) && !defined(__ANDROID__) && !defined(__IOS__)
|
||||
// Unity3D on a non-mobile platform
|
||||
homeDir = "" + current_dir; // homeDir shall be current dir
|
||||
// homeDir = "/Users/Joseph/utest2/";
|
||||
#endif
|
||||
|
||||
#if defined(__ANDROID__)
|
||||
@@ -177,7 +175,6 @@ extern "C" {
|
||||
}
|
||||
|
||||
LOGV("homeDir = %s", homeDir.c_str());
|
||||
|
||||
// Where network .conf files will be stored
|
||||
netDir = homeDir + "/networks.d";
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ int (*realclose)(CLOSE_SIG);
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
// Assembles (and/or) sets the RPC path for communication with the ZeroTier service
|
||||
void zt_init_rpc(char *path, char *nwid)
|
||||
void zt_init_rpc(const char *path, const char *nwid)
|
||||
{
|
||||
dwr(MSG_DEBUG, "zt_init_rpc\n");
|
||||
// Just double check we have
|
||||
|
||||
Reference in New Issue
Block a user