aboutsummaryrefslogtreecommitdiffstats
path: root/dns.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-03-29 04:49:24 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-03-29 04:49:24 +0000
commitde060dd25bf45b1ca8cb18b26bd9c59d144686c7 (patch)
tree4c7e9cead02cc96ac8467cf7fcce545de722fe75 /dns.c
parentf2529d4563eea317dcbb7bdbefcfd198da83936f (diff)
Simplify endianness and fix for unaligned reads (bug #3867)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5295 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'dns.c')
-rwxr-xr-xdns.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dns.c b/dns.c
index 359fd9e8e..807d2c279 100755
--- a/dns.c
+++ b/dns.c
@@ -19,12 +19,13 @@
#include <asterisk/logger.h>
#include <asterisk/channel.h>
#include <asterisk/dns.h>
+#include <asterisk/endian.h>
#define MAX_SIZE 4096
typedef struct {
unsigned id :16; /* query identification number */
-#if BYTE_ORDER == BIG_ENDIAN
+#if __BYTE_ORDER == __BIG_ENDIAN
/* fields in third byte */
unsigned qr: 1; /* response flag */
unsigned opcode: 4; /* purpose of message */
@@ -38,7 +39,7 @@ typedef struct {
unsigned cd: 1; /* checking disabled by resolver */
unsigned rcode :4; /* response code */
#endif
-#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN
+#if __BYTE_ORDER == __LITTLE_ENDIAN || __BYTE_ORDER == __PDP_ENDIAN
/* fields in third byte */
unsigned rd :1; /* recursion desired */
unsigned tc :1; /* truncated message */