summaryrefslogtreecommitdiffstats
path: root/ext/socket
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-31 11:17:40 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-31 11:17:40 +0000
commitd3401e1bd2fdcfd6124c0f291f8848165d890fad (patch)
treee18f9e038bcf75320f0a4b639907a44ab33a1926 /ext/socket
parent5d4f1ad7124ddcdcb14bd167407a2d613fe75514 (diff)
downloadruby-d3401e1bd2fdcfd6124c0f291f8848165d890fad.tar.gz
ruby-d3401e1bd2fdcfd6124c0f291f8848165d890fad.tar.xz
ruby-d3401e1bd2fdcfd6124c0f291f8848165d890fad.zip
* ext/socket/addrinfo.h (NI_MAXHOST): Define NI_MAXHOST and
NI_MAXHOST only if they are not defined yet. This fixes build such platforms as OpenBSD. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/addrinfo.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/socket/addrinfo.h b/ext/socket/addrinfo.h
index 5beea2cec..a22615ee0 100644
--- a/ext/socket/addrinfo.h
+++ b/ext/socket/addrinfo.h
@@ -115,8 +115,10 @@
/*
* Constants for getnameinfo()
*/
+#ifndef NI_MAXHOST
#define NI_MAXHOST 1025
#define NI_MAXSERV 32
+#endif
/*
* Flag values for getnameinfo()