[ovs-dev] [PATCH] util.c: Include pthread_np.h on FreeBSD

Ed Maste emaste at freebsd.org
Fri Aug 30 14:56:08 UTC 2013


Signed-off-by: Ed Maste <emaste at freebsd.org>
---
On FreeBSD pthread_set_name_np's prototype is provided by pthread_np.h.
As I believe it is the only platform to provide the "set_name" (with an
underscore) variant I hope it's fine to use the existing autoconf macro
HAVE_PTHREAD_SET_NAME_NP.

 lib/util.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/util.c b/lib/util.c
index 76c33cd..3cada4a 100644
--- a/lib/util.c
+++ b/lib/util.c
@@ -30,6 +30,9 @@
 #include "coverage.h"
 #include "ovs-thread.h"
 #include "vlog.h"
+#ifdef HAVE_PTHREAD_SET_NAME_NP
+#include <pthread_np.h>
+#endif
 
 VLOG_DEFINE_THIS_MODULE(util);
 
-- 
1.8.3.3




More information about the dev mailing list