diff --git a/src/util/virthread.c b/src/util/virthread.c index 6c495158f5665804585715abba3c414a87dc329f..05b5572f5f46431d43961c0811b017292d377853 100644 --- a/src/util/virthread.c +++ b/src/util/virthread.c @@ -268,7 +268,7 @@ bool virThreadIsSelf(virThreadPtr thread) * the pthread_self() id on Linux. */ unsigned long long virThreadSelfID(void) { -#if defined(HAVE_SYS_SYSCALL_H) && defined(SYS_gettid) +#if defined(HAVE_SYS_SYSCALL_H) && defined(SYS_gettid) && defined(__linux__) pid_t tid = syscall(SYS_gettid); return tid; #else