[bzflag] 16/36: Drop 03_maxhostnamelen.diff. Fixed upstream.
Markus Koschany
apo at moszumanska.debian.org
Fri Jul 22 11:16:14 UTC 2016
This is an automated email from the git hooks/post-receive script.
apo pushed a commit to branch master
in repository bzflag.
commit c9fbf7fc068c43be17634935e0f5492e1e16c86b
Author: Markus Koschany <apo at debian.org>
Date: Fri Jul 22 06:03:32 2016 +0200
Drop 03_maxhostnamelen.diff. Fixed upstream.
---
debian/patches/03_maxhostnamelen.diff | 141 ----------------------------------
debian/patches/series | 1 -
2 files changed, 142 deletions(-)
diff --git a/debian/patches/03_maxhostnamelen.diff b/debian/patches/03_maxhostnamelen.diff
deleted file mode 100644
index 7c28c6c..0000000
--- a/debian/patches/03_maxhostnamelen.diff
+++ /dev/null
@@ -1,141 +0,0 @@
-Description: Fix FTBFS on GNU Hurd due to undefined MAXHOSTNAMELEN
- Upstream fix to FTBFS, combination of commits 22792 and 22793.
- Updated to include missing MAXHOSTNAME definition in AresHandler.cxx
-Author: bullet_catcher
-Author: Ryan Kavanagh <rak at debian.org>
-Origin: upstream
-Bug: https://sourceforge.net/p/bzflag/bugs/600/
-Bug-Debian: http://bugs.debian.org/710797
-Applied-Upstream: https://sourceforge.net/p/bzflag/code/22792/
-Applied-Upstream: https://sourceforge.net/p/bzflag/code/22793/
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-Index: bzflag/src/net/Address.cxx
-===================================================================
---- bzflag.orig/src/net/Address.cxx 2013-06-03 14:29:09.811993899 -0400
-+++ bzflag/src/net/Address.cxx 2013-06-03 14:29:09.807993796 -0400
-@@ -37,6 +37,17 @@
- extern "C" int inet_aton(const char *, struct in_addr *);
- #endif
-
-+// RFC 1035 limits the length of a fully qualified domain name to 255
-+// octets, so calling sysconf(_SC_HOST_NAME_MAX) to find some other
-+// limit and/or dynamically expanding the gethostname() buffer on
-+// demand are complex solutions to a problem that does not exist in
-+// the environments for which BZFlag is designed. The value chosen
-+// here provides a substantial margin in case the RFC 1035 limit is
-+// raised in the future.
-+#ifndef MAXHOSTNAMELEN
-+#define MAXHOSTNAMELEN 511
-+#endif
-+
- //
- // Address
- //
-@@ -129,27 +140,38 @@
- return 4;
- }
-
-+static const struct hostent* bz_gethostbyname(const std::string &name)
-+{
-+ const struct hostent* hent = NULL;
-+
-+ if (name.length() > 0)
-+ hent = gethostbyname(name.c_str());
-+ else {
-+ // use our own host name if none is specified
-+ char hostname[MAXHOSTNAMELEN+1];
-+ if (gethostname(hostname, MAXHOSTNAMELEN) >= 0) {
-+ // ensure null termination regardless of
-+ // gethostname() implementation details
-+ hostname[MAXHOSTNAMELEN] = '\0';
-+ hent = gethostbyname(hostname);
-+ }
-+ }
-+ return hent;
-+}
-+
- Address Address::getHostAddress(const std::string &hname)
- {
- Address a;
- InAddr tempAddr;
- int j;
-
-- struct hostent* hent;
-- if (hname == "") { // local address
-- char hostname[MAXHOSTNAMELEN+1];
-- if (gethostname(hostname, sizeof(hostname)) >= 0)
-- hent = gethostbyname(hostname);
-- else
-- return a;
-- } else if (inet_aton(hname.c_str(), &tempAddr) != 0) {
-+ if (hname.length() > 0 && inet_aton(hname.c_str(), &tempAddr) != 0) {
- a.addr.clear();
- a.addr.push_back(tempAddr);
- return a;
-- } else { // non-local address
-- hent = gethostbyname(hname.c_str());
- }
-
-+ const struct hostent* hent = bz_gethostbyname(hname);
- if (!hent) {
- herror("Looking up host name");
- return a;
-@@ -177,16 +199,7 @@
-
- const std::string Address::getHostName(const std::string &hostname) // const
- {
-- char myname[MAXHOSTNAMELEN+1];
-- std::string name = hostname;
-- if (name.length() <= 0) {
-- if (gethostname(myname, sizeof(myname)) >= 0)
-- name = std::string(myname);
-- }
-- if (name.length() <= 0) {
-- return std::string();
-- }
-- struct hostent* hent = gethostbyname(name.c_str());
-+ const struct hostent* hent = bz_gethostbyname(hostname);
- if (!hent) {
- return std::string();
- }
-@@ -265,4 +278,3 @@
- // indent-tabs-mode: t ***
- // End: ***
- // ex: shiftwidth=2 tabstop=8
--
-Index: bzflag/include/network.h
-===================================================================
---- bzflag.orig/include/network.h 2013-06-03 14:29:09.811993899 -0400
-+++ bzflag/include/network.h 2013-06-03 14:29:09.807993796 -0400
-@@ -97,8 +97,6 @@
-
- #else /* !defined(_WIN32) */
-
--#define MAXHOSTNAMELEN 64
--
- #ifndef EINPROGRESS
- #define EINPROGRESS WSAEWOULDBLOCK
- #endif
-Index: bzflag/src/net/AresHandler.cxx
-===================================================================
---- bzflag.orig/src/net/AresHandler.cxx 2013-06-04 19:26:08.000000000 +0000
-+++ bzflag/src/net/AresHandler.cxx 2013-06-04 20:32:52.000000000 +0000
-@@ -17,6 +17,17 @@
- #include <errno.h>
- #include <string.h>
-
-+// RFC 1035 limits the length of a fully qualified domain name to 255
-+// octets, so calling sysconf(_SC_HOST_NAME_MAX) to find some other
-+// limit and/or dynamically expanding the gethostname() buffer on
-+// demand are complex solutions to a problem that does not exist in
-+// the environments for which BZFlag is designed. The value chosen
-+// here provides a substantial margin in case the RFC 1035 limit is
-+// raised in the future.
-+#ifndef MAXHOSTNAMELEN
-+#define MAXHOSTNAMELEN 511
-+#endif
-+
- bool AresHandler::globallyInited = false;
-
- AresHandler::AresHandler(int _index)
diff --git a/debian/patches/series b/debian/patches/series
index 3fa89bd..49f2e1d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,3 @@
-03_maxhostnamelen.diff
04_desktop_file_keywords.diff
05_dedup_pt_translations.diff
06_PATH_MAX.diff
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/bzflag.git
More information about the Pkg-games-commits
mailing list