diff --git a/compat/libcpuid/libcpuid_types.h b/compat/libcpuid/libcpuid_types.h index 36886e06..9e897275 100644 --- a/compat/libcpuid/libcpuid_types.h +++ b/compat/libcpuid/libcpuid_types.h @@ -32,36 +32,6 @@ #ifndef __LIBCPUID_TYPES_H__ #define __LIBCPUID_TYPES_H__ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#if defined(HAVE_STDINT_H) -# include -#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 +#include #endif /* __LIBCPUID_TYPES_H__ */ diff --git a/unix/cpu_unix.c b/unix/cpu_unix.c index 0e2f3d44..05b859b2 100644 --- a/unix/cpu_unix.c +++ b/unix/cpu_unix.c @@ -46,7 +46,7 @@ int affine_to_cpu_mask(int id, unsigned long mask) cpu_set_t 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)) { CPU_SET(i, &set); }