commit 6080e33737a133d080eb0f86a7b66f3af04f4c91 Author: Andrew Beekhof Date: Mon Feb 3 14:59:18 2014 +1100 Fix: Portability: Use basic types for DBus compatability struct (cherry picked from commit 73a40012cc03336fb9753bc6e47bace7bc44a794) diff --git a/include/portability.h b/include/portability.h index 29d1177..4eb6eaa 100644 --- a/include/portability.h +++ b/include/portability.h @@ -178,6 +178,7 @@ g_list_free_full(GList * list, GDestroyNotify free_func) # endif # ifndef HAVE_DBUSBASICVALUE +# include # include /** * An 8-byte struct you could use to access int64 without having @@ -185,8 +186,8 @@ g_list_free_full(GList * list, GDestroyNotify free_func) */ typedef struct { - dbus_uint32_t first32; /**< first 32 bits in the 8 bytes (beware endian issues) */ - dbus_uint32_t second32; /**< second 32 bits in the 8 bytes (beware endian issues) */ + uint32_t first32; /**< first 32 bits in the 8 bytes (beware endian issues) */ + uint32_t second32; /**< second 32 bits in the 8 bytes (beware endian issues) */ } DBus8ByteStruct; /** @@ -202,14 +203,14 @@ typedef struct typedef union { unsigned char bytes[8]; /**< as 8 individual bytes */ - dbus_int16_t i16; /**< as int16 */ - dbus_uint16_t u16; /**< as int16 */ - dbus_int32_t i32; /**< as int32 */ - dbus_uint32_t u32; /**< as int32 */ - dbus_bool_t bool_val; /**< as boolean */ + int16_t i16; /**< as int16 */ + uint16_t u16; /**< as int16 */ + int32_t i32; /**< as int32 */ + uint32_t u32; /**< as int32 */ + uint32_t bool_val; /**< as boolean */ # ifdef DBUS_HAVE_INT64 - dbus_int64_t i64; /**< as int64 */ - dbus_uint64_t u64; /**< as int64 */ + int64_t i64; /**< as int64 */ + uint64_t u64; /**< as int64 */ # endif DBus8ByteStruct eight; /**< as 8-byte struct */ double dbl; /**< as double */