File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1010#include <stdlib.h>
1111#include "utils.h"
1212#include "sqlite3.h"
13+
14+ #ifndef __linux__
1315#ifdef _WIN32
1416#include <windows.h>
1517#else
1618#include <pthread.h>
1719#endif
20+ #define PEERS 5
21+ #endif
1822
1923#ifdef CLOUDSYNC_LOAD_FROM_SOURCES
2024#include "cloudsync.h"
2125#endif
2226
23- #define PEERS 5
2427#define DB_PATH "health-track.sqlite"
2528#define EXT_PATH "./dist/cloudsync"
2629#define RCHECK if (rc != SQLITE_OK) goto abort_test;
@@ -315,6 +318,7 @@ int test_report(const char *description, int rc){
315318 return rc ;
316319}
317320
321+ #ifndef __linux__
318322#ifdef _WIN32
319323DWORD WINAPI worker (LPVOID arg ) {
320324#else
@@ -331,6 +335,7 @@ void* worker(void* arg) {
331335
332336 return NULL ;
333337}
338+ #endif
334339
335340int main (void ) {
336341 int rc = SQLITE_OK ;
@@ -352,6 +357,7 @@ int main (void) {
352357
353358 remove (DB_PATH ); // remove the database file
354359
360+ #ifndef __linux__
355361 #ifdef _WIN32
356362 HANDLE threads [PEERS ];
357363 #else
@@ -386,6 +392,7 @@ int main (void) {
386392 pthread_join (threads [i ], NULL );
387393 #endif
388394 }
395+ #endif
389396
390397 printf ("\n" );
391398 return rc ;
You can’t perform that action at this time.
0 commit comments