diff options
author | Yabin Cui <yabinc@google.com> | 2015-02-09 13:58:28 -0800 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2015-02-09 19:56:47 -0800 |
commit | 2d8f9b5aea90b57cd01c0a07cfff032092b4672e (patch) | |
tree | 5e0c6af872e20d46e99e1b47a6378360915b70bf /libc/dns | |
parent | a4fc89badf4ef4d42df0927340c6f0d02167a3d6 (diff) | |
download | bionic-2d8f9b5aea90b57cd01c0a07cfff032092b4672e.zip bionic-2d8f9b5aea90b57cd01c0a07cfff032092b4672e.tar.gz bionic-2d8f9b5aea90b57cd01c0a07cfff032092b4672e.tar.bz2 |
Define MAXHOSTNAMELEN explicitly in source files.
Bug: 19093777
Bug: 19092844
Change-Id: I0778507ca2d5c008abb9a6d6315d0909263a8817
Diffstat (limited to 'libc/dns')
-rw-r--r-- | libc/dns/include/resolv_private.h | 7 |
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 |