-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redefinition of __int64_t and __uint64_t for i386 #7
Comments
|
wargio, are you on a 64-bit system? Could you give me your build log where the error occurred? |
yes i am. as you asked b-man
|
Hmm, it looks like the current set of headers tries to use i386 (32-bit) types and defines even when building on a 64-bit host. I'll add the x86_64 headers and try to have all targets use build host provided machine types (where possible) to avoid name clashes and incompatible types. (I can't get this done today, but I'll try to get it done sometime this week). For now, I'd recommend replacing the size types in xnu-deps-linux/include/i386/_types.h with the following: #if defined(__x86_64__) && defined(__linux__)
/* We are running 64-bit linux, use local size types */
#include <sys/types.h>
#ifndef __int8_t
typedef int8_t __int8_t;
#endif
#ifndef __uint8_t
typedef uint8_t __uint8_t;
#endif
#ifndef __int16_t
typedef int16_t __int16_t;
#endif
#ifndef __uint16_t
typedef uint16_t __uint16_t;
#endif
#ifndef __int32_t
typedef int32_t __int32_t;
#endif
#ifndef __uint32_t
typedef uint32_t __uint32_t;
#endif
#ifndef __int64_t
typedef int64_t __int64_t;
#endif
#ifndef __uint64_t
typedef uint64_t __uint64_t;
#endif
#else
#ifdef __GNUC__
typedef __signed char __int8_t;
#else /* !__GNUC__ */
typedef char __int8_t;
#endif /* !__GNUC__ */
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
typedef long long __int64_t;
typedef unsigned long long __uint64_t;
#endif |
There is a problem when compiling it. i got a redefinition of of __int64_t and __uint64_t
my suggestion is to change them to
in this way it compiles and do not say anything since the definition is the same as on linux
The text was updated successfully, but these errors were encountered: