mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-23 08:28:52 +00:00
Fix build on FreeBSD/!x86
Checking battery status uses x86-only headers and functions. Remove this functionality to get it to build on other architectures.
This commit is contained in:
parent
d66db18c06
commit
7fdaa8285e
@ -62,7 +62,9 @@
|
|||||||
#include <devstat.h>
|
#include <devstat.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#if defined(__amd64__) || defined(__i386__)
|
||||||
#include <machine/apm_bios.h>
|
#include <machine/apm_bios.h>
|
||||||
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
@ -1086,6 +1088,7 @@ namespace cryptonote
|
|||||||
return boost::logic::tribool(boost::logic::indeterminate);
|
return boost::logic::tribool(boost::logic::indeterminate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__amd64__) || defined(__i386__)
|
||||||
apm_info info;
|
apm_info info;
|
||||||
if( ioctl(fd, APMIO_GETINFO, &info) == -1 ) {
|
if( ioctl(fd, APMIO_GETINFO, &info) == -1 ) {
|
||||||
close(fd);
|
close(fd);
|
||||||
@ -1126,6 +1129,7 @@ namespace cryptonote
|
|||||||
LOG_ERROR("sysctlbyname(\"hw.acpi.acline\") output is unexpectedly "
|
LOG_ERROR("sysctlbyname(\"hw.acpi.acline\") output is unexpectedly "
|
||||||
<< n << " bytes instead of the expected " << sizeof(ac) << " bytes.");
|
<< n << " bytes instead of the expected " << sizeof(ac) << " bytes.");
|
||||||
return boost::logic::tribool(boost::logic::indeterminate);
|
return boost::logic::tribool(boost::logic::indeterminate);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return boost::logic::tribool(ac == 0);
|
return boost::logic::tribool(ac == 0);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user