aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-10-16 13:53:14 -0500
committerluigi1111 <luigi1111w@gmail.com>2019-10-16 13:53:14 -0500
commit6c057239819f5884d2ab39e6203303efb40818bd (patch)
tree8e689654ed08a72464b1db99ee82e688ef8938e9 /src
parentMerge pull request #5962 (diff)
parentAdd also ifdef __x86_64__ (diff)
downloadmonero-6c057239819f5884d2ab39e6203303efb40818bd.tar.xz
Merge pull request #5984
7fdaa82 Fix build on FreeBSD/!x86 (pkubaj) 0f4fddc Add also ifdef __x86_64__ (pkubaj)
Diffstat (limited to 'src')
-rw-r--r--src/cryptonote_basic/miner.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cryptonote_basic/miner.cpp b/src/cryptonote_basic/miner.cpp
index 0188bf114..c4b5c8455 100644
--- a/src/cryptonote_basic/miner.cpp
+++ b/src/cryptonote_basic/miner.cpp
@@ -62,7 +62,9 @@
#include <devstat.h>
#include <errno.h>
#include <fcntl.h>
+#if defined(__amd64__) || defined(__i386__) || defined(__x86_64__)
#include <machine/apm_bios.h>
+#endif
#include <stdio.h>
#include <sys/resource.h>
#include <sys/sysctl.h>
@@ -1086,6 +1088,7 @@ namespace cryptonote
return boost::logic::tribool(boost::logic::indeterminate);
}
+#if defined(__amd64__) || defined(__i386__) || defined(__x86_64__)
apm_info info;
if( ioctl(fd, APMIO_GETINFO, &info) == -1 ) {
close(fd);
@@ -1126,6 +1129,7 @@ namespace cryptonote
LOG_ERROR("sysctlbyname(\"hw.acpi.acline\") output is unexpectedly "
<< n << " bytes instead of the expected " << sizeof(ac) << " bytes.");
return boost::logic::tribool(boost::logic::indeterminate);
+#endif
}
return boost::logic::tribool(ac == 0);
#endif