[PATCH] src: add pthread_np.h include for FreeBSD

Daniel P. Berrangé berrange at redhat.com
Thu Mar 5 15:16:00 UTC 2020


On FreeBSD the non-portable pthread APIs need to be obtained
via the pthread_np.h header.

Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
---

Pushed as a build fix for FreeBSD

 src/util/virthread.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/util/virthread.c b/src/util/virthread.c
index 40792afdc0..37b2cdfbe9 100644
--- a/src/util/virthread.c
+++ b/src/util/virthread.c
@@ -23,6 +23,10 @@
 
 #include "virthread.h"
 
+#ifdef __FreeBSD__
+# include <pthread_np.h>
+#endif
+
 #include <unistd.h>
 #include <inttypes.h>
 #if HAVE_SYS_SYSCALL_H
-- 
2.24.1




More information about the libvir-list mailing list