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

Daniel P. Berrangé posted 1 patch 4 years, 1 month ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20200305151600.2832815-1-berrange@redhat.com
src/util/virthread.c | 4 ++++
1 file changed, 4 insertions(+)
[PATCH] src: add pthread_np.h include for FreeBSD
Posted by Daniel P. Berrangé 4 years, 1 month ago
On FreeBSD the non-portable pthread APIs need to be obtained
via the pthread_np.h header.

Signed-off-by: Daniel P. Berrangé <berrange@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