Index: a/src/topology-freebsd.c
===================================================================
--- a/src/topology-freebsd.c	(révision 4577)
+++ a/src/topology-freebsd.c	(révision 4578)
@@ -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.
  */
@@ -27,7 +27,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)
 {
@@ -197,7 +197,7 @@
 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;
Index: a/config/hwloc.m4
===================================================================
--- a/config/hwloc.m4	(révision 4577)
+++ a/config/hwloc.m4	(révision 4578)
@@ -570,6 +570,7 @@
     ]])
     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')
     )
