Fix Linux build.
This commit is contained in:
parent
0c752ee018
commit
dfbfde5b22
2 changed files with 2 additions and 32 deletions
|
@ -32,36 +32,6 @@
|
||||||
#ifndef __LIBCPUID_TYPES_H__
|
#ifndef __LIBCPUID_TYPES_H__
|
||||||
#define __LIBCPUID_TYPES_H__
|
#define __LIBCPUID_TYPES_H__
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#include <stdint.h>
|
||||||
# include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(HAVE_STDINT_H)
|
|
||||||
# include <stdint.h>
|
|
||||||
#else
|
|
||||||
/* we have to provide our own: */
|
|
||||||
# if !defined(HAVE_INT32_T) && !defined(__int32_t_defined)
|
|
||||||
typedef int int32_t;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# if !defined(HAVE_UINT32_T) && !defined(__uint32_t_defined)
|
|
||||||
typedef unsigned uint32_t;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
typedef signed char int8_t;
|
|
||||||
typedef unsigned char uint8_t;
|
|
||||||
typedef signed short int16_t;
|
|
||||||
typedef unsigned short uint16_t;
|
|
||||||
#if (defined _MSC_VER) && (_MSC_VER <= 1300)
|
|
||||||
/* MSVC 6.0: no long longs ... */
|
|
||||||
typedef signed __int64 int64_t;
|
|
||||||
typedef unsigned __int64 uint64_t;
|
|
||||||
#else
|
|
||||||
/* all other sane compilers: */
|
|
||||||
typedef signed long long int64_t;
|
|
||||||
typedef unsigned long long uint64_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* __LIBCPUID_TYPES_H__ */
|
#endif /* __LIBCPUID_TYPES_H__ */
|
||||||
|
|
|
@ -46,7 +46,7 @@ int affine_to_cpu_mask(int id, unsigned long mask)
|
||||||
cpu_set_t set;
|
cpu_set_t set;
|
||||||
CPU_ZERO(&set);
|
CPU_ZERO(&set);
|
||||||
|
|
||||||
for (unsigned i = 0; i < cpu_info.count; i++) {
|
for (unsigned i = 0; i < cpu_info.total_logical_cpus; i++) {
|
||||||
if (mask & (1UL << i)) {
|
if (mask & (1UL << i)) {
|
||||||
CPU_SET(i, &set);
|
CPU_SET(i, &set);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue