gfbsd-ftbfs_r4578
authorSamuel Thibault <sthibault@debian.org>
Sat, 7 Jul 2012 04:18:49 +0000 (05:18 +0100)
committerSamuel Thibault <sthibault@debian.org>
Sat, 7 Jul 2012 04:18:49 +0000 (05:18 +0100)
===================================================================

Gbp-Pq: Name gfbsd-ftbfs_r4578

config/hwloc.m4
src/topology-freebsd.c

index 1b4b28dda8e3de0a907981d5f6967db9ed58fd73..c3feac203c00820fbe9e2c76ea3565b9bd79fcd7 100644 (file)
@@ -564,6 +564,7 @@ EOF])
     ]])
     AC_CHECK_FUNC([sched_setaffinity], [hwloc_have_sched_setaffinity=yes])
     AC_CHECK_HEADERS([sys/cpuset.h],,,[[#include <sys/param.h>]])
+    AC_CHECK_FUNCS([cpuset_setaffinity])
     AC_SEARCH_LIBS([pthread_getthrds_np], [pthread],
       AC_DEFINE([HWLOC_HAVE_PTHREAD_GETTHRDS_NP], 1, `Define to 1 if you have pthread_getthrds_np')
     )
index d27b1582e75a2278694849d22c7bb0e16c6a291c..a477befb5b51f8d0ecc9a9d420bb943f4247ffd0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright © 2009 CNRS
  * Copyright © 2009-2011 inria.  All rights reserved.
- * Copyright © 2009-2010 Université Bordeaux 1
+ * Copyright © 2009-2010, 2012 Université Bordeaux 1
  * Copyright © 2011 Cisco Systems, Inc.  All rights reserved.
  * See COPYING in top-level directory.
  */
@@ -24,7 +24,7 @@
 #include <private/private.h>
 #include <private/debug.h>
 
-#ifdef HAVE_SYS_CPUSET_H
+#if defined(HAVE_SYS_CPUSET_H) && defined(HAVE_CPUSET_SETAFFINITY)
 static void
 hwloc_freebsd_bsd2hwloc(hwloc_bitmap_t hwloc_cpuset, const cpuset_t *cpuset)
 {
@@ -181,7 +181,7 @@ hwloc_look_freebsd(struct hwloc_topology *topology)
 void
 hwloc_set_freebsd_hooks(struct hwloc_topology *topology)
 {
-#ifdef HAVE_SYS_CPUSET_H
+#if defined(HAVE_SYS_CPUSET_H) && defined(HAVE_CPUSET_SETAFFINITY)
   topology->set_thisproc_cpubind = hwloc_freebsd_set_thisproc_cpubind;
   topology->get_thisproc_cpubind = hwloc_freebsd_get_thisproc_cpubind;
   topology->set_thisthread_cpubind = hwloc_freebsd_set_thisthread_cpubind;