util: Include pthread_np.h on FreeBSD
authorEd Maste <emaste@freebsd.org>
Fri, 30 Aug 2013 14:56:08 +0000 (10:56 -0400)
committerBen Pfaff <blp@nicira.com>
Fri, 30 Aug 2013 16:34:21 +0000 (09:34 -0700)
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.

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/util.c

index 76c33cd..3cada4a 100644 (file)
@@ -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);