Skip to content

Commit c468713

Browse files
committed
Fix build on not-so-recent freebsd
CPU_WHICH_DOMAIN is relatively recent. Signed-off-by: Samuel Thibault <[email protected]>
1 parent 34cca80 commit c468713

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hwloc/topology-freebsd.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ get_memory_domain_info(int ndomains){
460460
return domains_memory;
461461
}
462462

463+
#ifdef CPU_WHICH_DOMAIN
463464
static int
464465
hwloc_look_freebsd_domains(struct hwloc_topology *topology){
465466
unsigned ndomains, i;
@@ -513,6 +514,7 @@ hwloc_look_freebsd_domains(struct hwloc_topology *topology){
513514

514515
return err;
515516
}
517+
#endif
516518

517519
static int
518520
hwloc_look_freebsd(struct hwloc_backend *backend, struct hwloc_disc_status *dstatus)
@@ -537,7 +539,9 @@ hwloc_look_freebsd(struct hwloc_backend *backend, struct hwloc_disc_status *dsta
537539
}
538540
} else if (dstatus->phase == HWLOC_DISC_PHASE_MEMORY) {
539541
int64_t memsize;
542+
#ifdef CPU_WHICH_DOMAIN
540543
hwloc_look_freebsd_domains(topology);
544+
#endif
541545
memsize = hwloc_fallback_memsize();
542546
if (memsize > 0)
543547
topology->machine_memory.local_memory = memsize;

0 commit comments

Comments
 (0)