Package: slang2
Version: 2.1.3-3
Severity: important
Tags: patch
User: [EMAIL PROTECTED]
Usertags: origin-ubuntu ubuntu-patch intrepid
Hi Alastair,
In the latest archive rebuilds for Ubuntu Intrepid, slang2 fails to build
because it expects to resolve an 'h_addr' member of 'struct hostent'. With
glibc 2.8, this is no longer available by default, but only when defining
_GNU_SOURCE.
The attached patch fixes the build failure, and I believe it's correct for
older versions of glibc as well, since h_addr_list is the standard interface
and h_addr should only be used when there's some indication we're on a
system that doesn't support the current standard.
Thought you might like to have this patch in advance, even though Debian
isn't moving to glibc 2.8 for lenny.
Cheers,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
[EMAIL PROTECTED] [EMAIL PROTECTED]
diff -Nru slang2-2.1.3/debian/changelog slang2-2.1.3/debian/changelog
--- slang2-2.1.3/debian/changelog 2008-07-21 22:35:40.000000000 +0000
+++ slang2-2.1.3/debian/changelog 2008-07-21 22:35:41.000000000 +0000
@@ -1,3 +1,10 @@
+slang2 (2.1.3-3ubuntu1) intrepid; urgency=low
+
+ * Reverse the sense of an #ifdef h_addr check, required for building
+ with glibc 2.8 and above. LP: #245627.
+
+ -- Steve Langasek <[EMAIL PROTECTED]> Mon, 21 Jul 2008 22:25:42 +0000
+
slang2 (2.1.3-3) unstable; urgency=low
* Move to Standards;Version: 3.7.3.
diff -Nru slang2-2.1.3/debian/patches/091_modern_hostent.patch slang2-2.1.3/debian/patches/091_modern_hostent.patch
--- slang2-2.1.3/debian/patches/091_modern_hostent.patch 1970-01-01 00:00:00.000000000 +0000
+++ slang2-2.1.3/debian/patches/091_modern_hostent.patch 2008-07-21 22:35:41.000000000 +0000
@@ -0,0 +1,12 @@
+diff -ruN slang-2.1.3-old/modules/socket-module.c slang-2.1.3/modules/socket-module.c
+--- slang-2.1.3-old/modules/socket-module.c 2007-10-24 02:17:41.000000000 +0000
++++ slang-2.1.3/modules/socket-module.c 2008-07-21 22:22:31.000000000 +0000
+@@ -442,7 +442,7 @@
+ throw_herror ("gethostbyname", h_errno);
+ return NULL;
+ }
+-#ifndef h_addr
++#ifdef h_addr
+ /* Older interface. There is only one address, so fake a list */
+ h_addr_list = fake_h_addr_list;
+ h_addr_list [0] = hp->h_addr;