From 3f4f0e392c0ae5a2e890cd8dfc92e0aacb4e443c Mon Sep 17 00:00:00 2001 From: h_vogt Date: Sat, 23 Mar 2013 19:32:15 +0100 Subject: [PATCH] sharedspice.c: correction for LINUX --- src/sharedspice.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/sharedspice.c b/src/sharedspice.c index e6467ff5b..2b3eb22f2 100644 --- a/src/sharedspice.c +++ b/src/sharedspice.c @@ -195,6 +195,8 @@ void shared_exit(int status); void sighandler_sharedspice(int num); +void wl_delete_first(wordlist **wlstart, wordlist **wlend); + #if !defined(low_latency) static char* outstorage(char*, bool); static void* printsend(void); @@ -596,8 +598,17 @@ bot: #if !defined(low_latency) /* If caller has sent valid address for pfcn */ if (!noprintfwanted) + +#ifdef HAVE_LIBPTHREAD + pthread_create(&tid, NULL, (void * (*)(void *)) printsend, NULL); +#elif defined _MSC_VER || defined __MINGW32__ printtid = (HANDLE)_beginthreadex(NULL, 0, (unsigned int (__stdcall *)(void *))printsend, (void*) NULL, 0, NULL); +#else + printtid = CreateThread(NULL, 0, (PTHREAD_START_ROUTINE) printsend, NULL, + 0, NULL); +#endif + #endif return 0;