]> xenbits.xensource.com Git - people/andrewcoop/hwloc.git/commitdiff
freebsd: add #ifdef HAVE_SYS_SYSCTL_H around hw...
authorBrice Goglin <brice.goglin@inria.fr>
Mon, 20 May 2013 14:54:28 +0000 (14:54 +0000)
committerBrice Goglin <brice.goglin@inria.fr>
Mon, 20 May 2013 14:54:28 +0000 (14:54 +0000)
freebsd: add #ifdef HAVE_SYS_SYSCTL_H around hwloc_freebsd_node_meminfo_info()

It's needed for CTL_HW.

Thanks to Pavan Balaji.

This commit was SVN r5633.

src/topology-freebsd.c

index fd26aa8505d8890871f16aec82537131db6c50a1..7e13ca166bbeec81123a9f6c758c6975542897a7 100644 (file)
@@ -164,7 +164,7 @@ hwloc_freebsd_get_thread_cpubind(hwloc_topology_t topology __hwloc_attribute_unu
 #endif
 #endif
 
-#ifdef HAVE_SYSCTL
+#if (defined HAVE_SYSCTL) && (defined HAVE_SYS_SYSCTL_H)
 static void
 hwloc_freebsd_node_meminfo_info(struct hwloc_topology *topology)
 {
@@ -187,7 +187,7 @@ hwloc_look_freebsd(struct hwloc_backend *backend)
   }
 
   /* Add FreeBSD specific information */
-#ifdef HAVE_SYSCTL
+#if (defined HAVE_SYSCTL) && (defined HAVE_SYS_SYSCTL_H)
   hwloc_freebsd_node_meminfo_info(topology);
 #endif
   hwloc_obj_add_info(topology->levels[0][0], "Backend", "FreeBSD");