File C89-fix.patch of Package xorg-x11
From 3cc17297124ea5c9917e6eacc0ab7ae021e8a386 Mon Sep 17 00:00:00 2001
From: Jens Granseuer <jensgr@gmx.net>
Date: Sun, 9 Mar 2008 20:06:49 +0100
Subject: C89 fix
65a0917d4661e370b50beed8f06f5577bfeea59f broke the build with non-C99
aware compilers.
---
gethost.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
Index: xauth-1.0.3/gethost.c
===================================================================
--- xauth-1.0.3.orig/gethost.c
+++ xauth-1.0.3/gethost.c
@@ -296,6 +296,8 @@ struct addrlist *get_address_info (
hints.ai_protocol = 0;
if (getaddrinfo(host,NULL,&hints,&firstai) !=0) return NULL;
for (ai = firstai; ai != NULL; ai = ai->ai_next) {
+ struct addrlist *duplicate;
+
if (ai->ai_family == AF_INET) {
struct sockaddr_in *sin = (struct sockaddr_in *)ai->ai_addr;
src = &(sin->sin_addr);
@@ -308,7 +310,6 @@ struct addrlist *get_address_info (
family = FamilyInternet6;
}
- struct addrlist *duplicate;
for(duplicate = retval; duplicate != NULL; duplicate = duplicate->next) {
if(duplicate->family == family && duplicate->len == len &&
memcmp(duplicate->address, src, len) == 0) {