krb5 commit: Add MAXHOSTNAME guard in Windows public header

Greg Hudson <[email protected]>
Newsgroups gmane.comp.encryption.kerberos.cvs
Message-ID <[email protected]>
https://github.com/krb5/krb5/commit/3e3675ced526ff25267b318f293e66531382d257
commit 3e3675ced526ff25267b318f293e66531382d257
Author: Vipul Mehta <[email protected]>
Date:   Mon May 31 12:15:07 2021 +0530

    Add MAXHOSTNAME guard in Windows public header
    
    The ACE library defines a MAXHOSTNAMELEN macro, which conflicts if a
    source file includes headers from both libraries.
    
    ticket: 9010 (new)

 src/include/win-mac.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/include/win-mac.h b/src/include/win-mac.h
index dc0f2a1..0fd3a29 100644
--- a/src/include/win-mac.h
+++ b/src/include/win-mac.h
@@ -101,7 +101,10 @@ typedef _W64 int         ssize_t;
 #endif
 #endif /* KRB5_SYSTYPES__ */
 
+#ifndef MAXHOSTNAMELEN
 #define MAXHOSTNAMELEN  512
+#endif
+
 #ifndef MAXPATHLEN
 #define MAXPATHLEN      256            /* Also for Windows temp files */
 #endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.