mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-26 12:30:30 +00:00
Make more compatibility improvements
This commit is contained in:
parent
12d9e1e128
commit
55c6297e13
63 changed files with 513 additions and 80 deletions
|
@ -17,10 +17,11 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/assert.h"
|
||||
#include "libc/intrin/popcnt.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/sched-sysv.internal.h"
|
||||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/intrin/popcnt.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/nt/dll.h"
|
||||
#include "libc/nt/struct/systeminfo.h"
|
||||
|
@ -36,7 +37,7 @@
|
|||
static unsigned GetCpuCountLinux(void) {
|
||||
uint64_t s[16];
|
||||
unsigned i, c, n;
|
||||
if (!sched_getaffinity(0, sizeof(s), s)) {
|
||||
if (!sys_sched_getaffinity(0, sizeof(s), s)) {
|
||||
for (c = i = 0; i < ARRAYLEN(s); ++i) {
|
||||
c += popcnt(s[i]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue