[krb5/f21] Define _GNU_SOURCE to get EAI_NODATA and EAI_ADDRFAMILY

Nalin Dahyabhai nalin at fedoraproject.org
Thu Sep 4 12:46:27 UTC 2014


commit a05b95f5142d935c918cc0ecffdef6d6e09a7052
Author: Nalin Dahyabhai <nalin at redhat.com>
Date:   Thu Aug 28 16:02:55 2014 -0400

    Define _GNU_SOURCE to get EAI_NODATA and EAI_ADDRFAMILY
    
    - define _GNU_SOURCE in files where we use EAI_NODATA, to make sure that
      it's declared (#1059730,#1084068,#1109102)

 krb5-1.12-system-exts.patch |   53 +++++++++++++++++++++++++++++++++++++++++++
 krb5.spec                   |    4 +++
 2 files changed, 57 insertions(+), 0 deletions(-)
---
diff --git a/krb5-1.12-system-exts.patch b/krb5-1.12-system-exts.patch
new file mode 100644
index 0000000..fc518c4
--- /dev/null
+++ b/krb5-1.12-system-exts.patch
@@ -0,0 +1,53 @@
+On a glibc system, EAI_NODATA isn't defined unless _GNU_SOURCE is.  The
+recommended thing is to use AC_USE_SYSTEM_EXTENSIONS to get all extensions
+defined, but that would require fixups in varous other places, so we go for the
+smaller change here.
+
+--- krb5-1.11/src/lib/krb5/os/hostrealm.c
++++ krb5-1.11/src/lib/krb5/os/hostrealm.c
+@@ -30,6 +30,9 @@
+  * OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
+ 
++/* We need to have EAI_NODATA and friends declared. */
++#define _GNU_SOURCE
++
+ #include "k5-int.h"
+ #include "os-proto.h"
+ #include "fake-addrinfo.h"
+--- krb5-1.11/src/lib/krb5/os/sendto_kdc.c
++++ krb5-1.11/src/lib/krb5/os/sendto_kdc.c
+@@ -27,6 +27,9 @@
+ /* Send packet to KDC for realm; wait for response, retransmitting
+  * as necessary. */
+ 
++/* We need to have EAI_NODATA and friends declared. */
++#define _GNU_SOURCE
++
+ #include "fake-addrinfo.h"
+ #include "k5-int.h"
+ 
+--- krb5-1.11/src/util/support/fake-addrinfo.c
++++ krb5-1.11/src/util/support/fake-addrinfo.c
+@@ -101,6 +101,9 @@
+  *   these functions, and throw all this away.  Pleeease?  :-)
+  */
+ 
++/* We need to have EAI_NODATA and friends declared. */
++#define _GNU_SOURCE
++
+ #include "port-sockets.h"
+ #include "socket-utils.h"
+ #include "k5-platform.h"
+--- krb5-1.12/src/lib/krad/client.c
++++ krb5-1.12/src/lib/krad/client.c
+@@ -27,6 +27,9 @@
+  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
+ 
++/* We need to have EAI_NODATA and friends declared. */
++#define _GNU_SOURCE
++
+ #include <k5-queue.h>
+ #include "internal.h"
+ 
diff --git a/krb5.spec b/krb5.spec
index 92140c1..56c43ab 100644
--- a/krb5.spec
+++ b/krb5.spec
@@ -100,6 +100,7 @@ Patch142: krb5-master-move-otp-sockets.patch
 Patch145: krb5-master-mechd.patch
 Patch146: krb5-master-strdupcheck.patch
 Patch147: krb5-master-compatible-keys.patch
+Patch148: krb5-1.12-system-exts.patch
 Patch201: 0001-In-ksu-merge-krb5_ccache_copy-and-_restricted.patch
 Patch202: 0002-In-ksu-don-t-stat-not-on-disk-ccache-residuals.patch
 Patch203: 0003-Use-an-intermediate-memory-cache-in-ksu.patch
@@ -349,6 +350,7 @@ ln -s NOTICE LICENSE
 %patch145 -p1 -b .master-mechd
 %patch146 -p1 -b .master-strdupcheck
 %patch147 -p1 -b .master-compatible-keys
+%patch148 -p1 -b .system-exts
 
 # Take the execute bit off of documentation.
 chmod -x doc/krb5-protocol/*.txt doc/ccapi/*.html
@@ -1028,6 +1030,8 @@ exit 0
 * Thu Aug 28 2014 Nalin Dahyabhai <nalin at redhat.com> - 1.12.2-5
 - backport fix for trying all compatible keys when not being strict about
   acceptor names while reading AP-REQs (RT#7883, #1078888)
+- define _GNU_SOURCE in files where we use EAI_NODATA, to make sure that
+  it's declared (#1059730,#1084068,#1109102)
 
 * Tue Aug 26 2014 Nalin Dahyabhai <nalin at redhat.com> - 1.12.2-4
 - kpropd hasn't bothered with -S since 1.11; stop trying to use that flag


More information about the scm-commits mailing list