From ebdfa892b313774085e8d3d9c71b9de1e627567f Mon Sep 17 00:00:00 2001 From: irungentoo Date: Thu, 25 Sep 2014 16:49:05 -0400 Subject: [PATCH] Removed now useless atributes from structs. --- toxcore/DHT.h | 2 +- toxcore/network.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/toxcore/DHT.h b/toxcore/DHT.h index 4beda37e..ae1bcc72 100644 --- a/toxcore/DHT.h +++ b/toxcore/DHT.h @@ -135,7 +135,7 @@ typedef struct { NAT nat; } DHT_Friend; -typedef struct __attribute__ ((__packed__)) +typedef struct { uint8_t client_id[CLIENT_ID_SIZE]; IP_Port ip_port; diff --git a/toxcore/network.h b/toxcore/network.h index 6e1f2244..b42bfbf4 100644 --- a/toxcore/network.h +++ b/toxcore/network.h @@ -134,7 +134,7 @@ typedef int sock_t; #define TCP_INET6 (AF_INET6 + 3) #define TCP_FAMILY (AF_INET6 + 4) -typedef union __attribute__ ((__packed__)) +typedef union { uint8_t uint8[4]; uint16_t uint16[2]; @@ -143,7 +143,7 @@ typedef union __attribute__ ((__packed__)) } IP4; -typedef union __attribute__ ((__packed__)) +typedef union { uint8_t uint8[16]; uint16_t uint16[8]; @@ -153,7 +153,7 @@ typedef union __attribute__ ((__packed__)) } IP6; -typedef struct __attribute__ ((__packed__)) +typedef struct { uint8_t family; union { @@ -163,7 +163,7 @@ typedef struct __attribute__ ((__packed__)) } IP; -typedef struct __attribute__ ((__packed__)) __attribute__((gcc_struct)) +typedef struct { IP ip; uint16_t port;