summaryrefslogtreecommitdiffstats
path: root/libc/dns
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2015-02-10 18:09:57 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-02-10 18:09:57 +0000
commit8dc24ee55e05cfb54af5ef29d9f8a19ef65462c1 (patch)
treeb932a2b9686d0ed352f5fb43eb3dcef557e4343b /libc/dns
parent37529bc8451dbb4adbcc93234d064e576c456324 (diff)
parent3a31e697ca3c1207bfec64b555bcff7b129348a3 (diff)
downloadbionic-8dc24ee55e05cfb54af5ef29d9f8a19ef65462c1.zip
bionic-8dc24ee55e05cfb54af5ef29d9f8a19ef65462c1.tar.gz
bionic-8dc24ee55e05cfb54af5ef29d9f8a19ef65462c1.tar.bz2
am 3a31e697: am ee17e880: Merge "Define MAXHOSTNAMELEN explicitly in source files."
* commit '3a31e697ca3c1207bfec64b555bcff7b129348a3': Define MAXHOSTNAMELEN explicitly in source files.
Diffstat (limited to 'libc/dns')
-rw-r--r--libc/dns/include/resolv_private.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libc/dns/include/resolv_private.h b/libc/dns/include/resolv_private.h
index 4a832d0..0dab3d8 100644
--- a/libc/dns/include/resolv_private.h
+++ b/libc/dns/include/resolv_private.h
@@ -63,6 +63,13 @@
/* Despite this file's name, it's part of libresolv. On Android, that means it's part of libc :-( */
#pragma GCC visibility push(default)
+// Linux defines MAXHOSTNAMELEN as 64, while the domain name limit in
+// RFC 1034 and RFC 1035 is 255 octets.
+#ifdef MAXHOSTNAMELEN
+#undef MAXHOSTNAMELEN
+#endif
+#define MAXHOSTNAMELEN 256
+
/*
* Revision information. This is the release date in YYYYMMDD format.
* It can change every day so the right thing to do with it is use it