ORBit2-2.13.2



Compiling on Solaris 2.6 and 7 gives:
 cc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../linc2/include -I../../linc2/include -mt -I/opt/TWWfsw/libglib26/include -I/opt/TWWfsw/libglib26/lib/include -I/opt/TWWfsw/gettext014/include -I/opt/TWWfsw/libiconv19/include -DG_DISABLE_DEPRECATED -D_GNU_SOURCE -I/opt/TWWfsw/libpopt17/include -mr -Qn -xstrconst -xO2 -xtarget=generic -c linc-protocols.c  -KPIC -DPIC -o .libs/linc-protocols.o
"linc-protocols.c", line 170: invalid cast expression
"linc-protocols.c", line 174: invalid cast expression
"linc-protocols.c", line 239: incomplete struct/union/enum addrinfo: hints
"linc-protocols.c", line 241: undefined struct/union member: ai_flags
"linc-protocols.c", line 241: undefined symbol: AI_CANONNAME
"linc-protocols.c", line 242: warning: implicit function declaration: getaddrinfo
"linc-protocols.c", line 243: undefined struct/union member: ai_canonname
"linc-protocols.c", line 243: warning: improper pointer/integer combination: arg #2
"linc-protocols.c", line 244: warning: implicit function declaration: freeaddrinfo
cc: acomp failed for linc-protocols.c

Seems like this code isn't wrapped in:
  #if defined (AF_INET6) && defined (HAVE_GETADDRINFO)

Is a patch like below correct?

-- 
albert chin (china thewrittenword com)

-- snip snip
Index: linc2/src/linc-protocols.c
===================================================================
--- linc2/src/linc-protocols.c.orig	2005-08-12 11:03:45.000000000 -0500
+++ linc2/src/linc-protocols.c	2005-11-15 08:31:15.897910000 -0600
@@ -235,6 +235,7 @@
 		}
 	}
 
+#if defined (AF_INET6) && defined (HAVE_GETADDRINFO) 
 	if (LINK_NET_ID_IS_FQDN == which) {
 		struct addrinfo *result, hints;
 		memset(&hints, 0, sizeof(struct addrinfo));
@@ -247,6 +248,7 @@
 
 		return buf;
 	}
+#endif
 
 out:
 	return NULL;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]