1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2025-10-03 11:01:30 +00:00

Support get_total_cpus() on DragonFly BSD

Tested on DragonFly BSD 6: it works as expected.
This commit is contained in:
The Tumultuous Unicorn Of Darkness 2024-07-27 12:00:23 +02:00
commit 3c37492b93
No known key found for this signature in database
GPG key ID: 1E55EE2EFF18BC1A
2 changed files with 3 additions and 3 deletions

View file

@ -456,7 +456,7 @@ static bool set_cpu_affinity(logical_cpu_t logical_cpu)
#define SET_CPU_AFFINITY
#endif /* defined sun || defined __sun */
#if defined __FreeBSD__ || defined __OpenBSD__ || defined __NetBSD__ || defined __bsdi__ || defined __QNX__
#if defined __FreeBSD__ || defined __DragonFly__ || defined __OpenBSD__ || defined __NetBSD__ || defined __bsdi__ || defined __QNX__
#include <sys/types.h>
#include <sys/sysctl.h>
@ -469,7 +469,7 @@ static int get_total_cpus(void)
return ncpus;
}
#define GET_TOTAL_CPUS_DEFINED
#endif /* defined __FreeBSD__ || defined __OpenBSD__ || defined __NetBSD__ || defined __bsdi__ || defined __QNX__ */
#endif /* defined __FreeBSD__ || defined __DragonFly__ || defined __OpenBSD__ || defined __NetBSD__ || defined __bsdi__ || defined __QNX__ */
#if defined __FreeBSD__
#include <sys/param.h>