Bug 8062

Summary: bind-8.2.2_P3 does not compile with glibc 2.0
Product: [Retired] Red Hat Linux Reporter: Keith Owens <kaos>
Component: bindAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: pekkas
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-12-30 17:31:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Keith Owens 1999-12-30 12:01:18 UTC
ftp://updates.redhat.com/6.1/SRPMS/bind-8.2.2_P3-1.src.rpm
will not compile with glibc 2.0 (/lib/libc-2.0.7.so).  It gets errors
because __FDS_BITS is not defined.  This patch works for me.

--- src/port/linux/include/port_after.h.orig    Thu Dec 30 21:40:23 1999
+++ src/port/linux/include/port_after.h Thu Dec 30 21:16:50 1999
@@ -85,4 +85,8 @@
        u_int32_t       sin6_scope_id;  /* set of interfaces for a scope */
 };
 #endif /* HAS_INET6_STRUCTS */
+
+#ifndef __FDS_BITS
+# define __FDS_BITS(set) ((set)->fds_bits)
+#endif
 #endif /* ! PORT_AFTER_H */

Comment 1 Bill Nottingham 1999-12-30 17:31:59 UTC
If you're wanting to compile/install on a glibc-2.0 system,
use the binary/source RPMs for 5.2.

Comment 2 Pekka Savola 2000-03-18 22:16:59 UTC
I created this patch to replace pretty inane bind-8.2-glibc21.patch.  With this,
recompiling the latest Bind off Rawhide works on Glibc 2.1 systems as well as
Glibc 2.0 (e.g. Redhat 5.2).

IMO, this approach would be better than just removing backward compatibility.

I'm not sure if that __GLIBC__ way is the best way to fix this, but at least it
seems to work.

HTH,

--- bind-8.2.2_P5/src/port/linux/include/port_after.h.orig    Sun Mar 19
00:02:04 2000
+++ bind-8.2.2_P5/src/port/linux/include/port_after.h Sun Mar 19 00:15:55 2000
@@ -65,7 +65,7 @@
 #define PF_INET6       AF_INET6
 #endif

-#ifndef HAS_INET6_STRUCTS
+#if !defined(HAS_INET6_STRUCTS) && (__GLIBC__ == 2 && __GLIBC_MINOR__ == 0 )
 /* Replace with structure from later rev of O/S if known. */
 struct in6_addr {
        u_int8_t        s6_addr[16];
@@ -85,4 +85,9 @@
        u_int32_t       sin6_scope_id;  /* set of interfaces for a scope */
 };
 #endif /* HAS_INET6_STRUCTS */
+
+#if !defined(__FDS_BITS) && (__GLIBC__ == 2 && __GLIBC_MINOR__ == 0 )
+# define __FDS_BITS(set) ((set)->fds_bits)
+#endif
+
 #endif /* ! PORT_AFTER_H */