From: Victor Julien Date: Mon, 5 Sep 2016 08:15:52 +0000 (+0200) Subject: threads: provide SCGetThreadIdLong for SunOS X-Git-Tag: suricata-3.1.2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef1acdfaeec1941f513d5f98fd54bda3c8388a7d;p=thirdparty%2Fsuricata.git threads: provide SCGetThreadIdLong for SunOS --- diff --git a/src/threads.h b/src/threads.h index 0a843b7ff0..213b064243 100644 --- a/src/threads.h +++ b/src/threads.h @@ -243,6 +243,14 @@ enum { u_long tid = (u_long)tpid; \ tid; \ }) +#elif defined(sun) +#include +#define SCGetThreadIdLong(...) ({ \ + thread_t tmpthid = thr_self(); \ + u_long tid = (u_long)tmpthid; \ + tid; \ +}) + #else #define SCGetThreadIdLong(...) ({ \ pid_t tmpthid; \