summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-08-01 22:40:06 +0000
committerUlrich Drepper <drepper@redhat.com>2008-08-01 22:40:06 +0000
commit144bfa86e2dee39d4085acf9172044daf162b9ec (patch)
treed00353da3f685665819e3fb874c0875229a7f25d
parent7e1b29c64a56ee64d60922d541d6e3820122cfb1 (diff)
* include/arpa/nameser.h (NS_GET16): Use const pointer.
(NS_GET32): Likewise.
-rw-r--r--ChangeLog3
-rw-r--r--include/arpa/nameser.h8
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 7b18d2acdc..633622292a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2008-08-01 Ulrich Drepper <drepper@redhat.com>
+ * include/arpa/nameser.h (NS_GET16): Use const pointer.
+ (NS_GET32): Likewise.
+
* sysdeps/unix/sysv/linux/kernel-features.h: s390 has the new
syscalls, too.
diff --git a/include/arpa/nameser.h b/include/arpa/nameser.h
index 89ee6b031c..57f7457848 100644
--- a/include/arpa/nameser.h
+++ b/include/arpa/nameser.h
@@ -1,3 +1,5 @@
+#ifndef _ARPA_NAMESER_H_
+
#include <resolv/arpa/nameser.h>
/* If the machine allows unaligned access we can do better than using
@@ -14,7 +16,7 @@ extern const struct _ns_flagdata _ns_flagdata[] attribute_hidden;
# undef NS_GET16
# define NS_GET16(s, cp) \
do { \
- uint16_t *t_cp = (uint16_t *) (cp); \
+ const uint16_t *t_cp = (const uint16_t *) (cp); \
(s) = ntohs (*t_cp); \
(cp) += NS_INT16SZ; \
} while (0)
@@ -22,7 +24,7 @@ extern const struct _ns_flagdata _ns_flagdata[] attribute_hidden;
# undef NS_GET32
# define NS_GET32(l, cp) \
do { \
- uint32_t *t_cp = (uint32_t *) (cp); \
+ const uint32_t *t_cp = (const uint32_t *) (cp); \
(l) = ntohl (*t_cp); \
(cp) += NS_INT32SZ; \
} while (0)
@@ -71,3 +73,5 @@ libresolv_hidden_proto (ns_samedomain)
libresolv_hidden_proto (ns_samename)
libresolv_hidden_proto (ns_makecanon)
libresolv_hidden_proto (ns_format_ttl)
+
+#endif