Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pytorch/cpuinfo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoumith Chintala <sc3104@nyu.edu>2020-04-22 18:45:41 +0300
committerGitHub <noreply@github.com>2020-04-22 18:45:41 +0300
commita1e0b9571b51131cf80613d061d2aa123876bd0a (patch)
treeeb3376471f680bc52c246971acbd6548aeafb74f
parent0cc563acb9baac39f2c1349bc42098c4a1da59e3 (diff)
parent02fe981f781fff599d522cb61c3557e446c2bb28 (diff)
Merge pull request #37 from AshkanAliabadi/issue_36
Fix a build error some users are experiencing wherein __NR_getcpu is not defined
-rw-r--r--src/api.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/api.c b/src/api.c
index 0cc5d4e..38cea86 100644
--- a/src/api.c
+++ b/src/api.c
@@ -10,6 +10,9 @@
#include <unistd.h>
#include <sys/syscall.h>
+ #if !defined(__NR_getcpu)
+ #include <asm-generic/unistd.h>
+ #endif
#endif
bool cpuinfo_is_initialized = false;