mirror of
https://github.com/anrieff/libcpuid
synced 2024-11-10 22:59:13 +00:00
Resolve warnings on Mac OS X.
This commit is contained in:
parent
dbf9991553
commit
24d7c318d0
2 changed files with 8 additions and 1 deletions
|
@ -589,3 +589,5 @@ uint8_t cc_x64driver_code[5120] = {
|
|||
};
|
||||
//} end
|
||||
#endif // _WIN32
|
||||
|
||||
int msrdriver_dummy; // a dummy to avoid a linker warning on OS X.
|
||||
|
|
|
@ -463,8 +463,11 @@ int cpu_msr_driver_close(struct msr_driver_t* drv)
|
|||
/* endif defined (_WIN32) */
|
||||
|
||||
#else /* Unsupported OS */
|
||||
/* On others OS (lie Darwin), we still do not support RDMSR, so supply dummy struct
|
||||
/* On others OS (i.e., Darwin), we still do not support RDMSR, so supply dummy struct
|
||||
and functions */
|
||||
|
||||
#define RDMSR_UNSUPPORTED_OS
|
||||
|
||||
struct msr_driver_t { int dummy; };
|
||||
struct msr_driver_t* cpu_msr_driver_open(void)
|
||||
{
|
||||
|
@ -502,6 +505,7 @@ int cpu_msrinfo(struct msr_driver_t* driver, cpu_msrinfo_request_t which)
|
|||
|
||||
#endif /* Unsupported OS */
|
||||
|
||||
#ifndef RDMSR_UNSUPPORTED_OS
|
||||
|
||||
/* Useful links for hackers:
|
||||
- AMD MSRs:
|
||||
|
@ -837,3 +841,4 @@ int cpu_msrinfo(struct msr_driver_t* handle, cpu_msrinfo_request_t which)
|
|||
}
|
||||
#endif // MSRINFO_DEFINED
|
||||
|
||||
#endif // RDMSR_UNSUPPORTED_OS
|
||||
|
|
Loading…
Reference in a new issue