From f36c29aa2b10fe13dff3c51887b337bc592a2a96 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 7 Jul 2012 05:18:49 +0100 Subject: [PATCH] gfbsd-ftbfs_r4578 =================================================================== Gbp-Pq: Name gfbsd-ftbfs_r4578 --- config/hwloc.m4 | 1 + src/topology-freebsd.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config/hwloc.m4 b/config/hwloc.m4 index 1b4b28d..c3feac2 100644 --- a/config/hwloc.m4 +++ b/config/hwloc.m4 @@ -564,6 +564,7 @@ EOF]) ]]) AC_CHECK_FUNC([sched_setaffinity], [hwloc_have_sched_setaffinity=yes]) AC_CHECK_HEADERS([sys/cpuset.h],,,[[#include ]]) + 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') ) diff --git a/src/topology-freebsd.c b/src/topology-freebsd.c index d27b158..a477bef 100644 --- a/src/topology-freebsd.c +++ b/src/topology-freebsd.c @@ -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 #include -#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; -- 2.30.2