|
Description
|
Some OpenSource applications using following definations which Solaris does not have:
1. u_int8_t/u_int16_t/u_int32_t/u_int64_t
2. __u64/__u32/__u16/__u8
3. __s64/__s32/__s16/__s8
Common fix is to define in source code where need as following, it is good Solaris can recognize them by default.
typedef uint8_t u_int8_t;
typedef uint16_t u_int16_t;
typedef uint32_t u_int32_t;
typedef uint64_t u_int64_t;
typedef uint8_t __u8;
typedef uint16_t __u16;
typedef uint32_t __u32;
typedef uint64_t __u64;
typedef int8_t __s8;
typedef int16_t __s16;
typedef int32_t __s32;
typedef int64_t __s64;
$cc main.c
"main.c", line 23: undefined symbol: u_int8_t
"main.c", line 23: syntax error before or at: a1
"main.c", line 24: undefined symbol: u_int16_t
"main.c", line 25: undefined symbol: u_int32_t
"main.c", line 26: undefined symbol: u_int64_t
"main.c", line 28: undefined symbol: __u8
"main.c", line 29: undefined symbol: __u16
"main.c", line 30: undefined symbol: __u32
"main.c", line 31: undefined symbol: __u64
"main.c", line 33: undefined symbol: __s8
"main.c", line 34: undefined symbol: __s16
"main.c", line 35: undefined symbol: __s32
"main.c", line 36: undefined symbol: __s64
$cc -DLINUX main.c
$
|