Define MAXHOSTNAMELEN explicitly in source files.

Bug: 19093777
Bug: 19092844
Change-Id: I0778507ca2d5c008abb9a6d6315d0909263a8817
This commit is contained in:
Yabin Cui
2015-02-09 13:58:28 -08:00
parent a4fc89badf
commit 2d8f9b5aea
5 changed files with 12 additions and 9 deletions

View File

@@ -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