help-cfengine
[Top][All Lists]
Advanced

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

cfenfine 2 without IPv6


From: José M. Fandiño
Subject: cfenfine 2 without IPv6
Date: Tue, 02 Apr 2002 17:20:16 +0000

Hello friends,

I'm trying get a working cfengine 2.0.0 in a GNU/Linux machine with
a 2.0.x kernel (yes, a 2.0.x kernel :). This kernel don't support IPv6
so I'm getting several errors during the compilation.

gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/BerkeleyDB.4.0/include 
-I/usr/local/ssl/include    -g -O2  -Wreturn-type -Wmissing-prototypes 
-Wuninitialized -c proto.c
proto.c: In function `IdentifyForVerification':
proto.c:102: sizeof applied to an incomplete type
make[1]: *** [proto.o] Error 1
make[1]: Leaving directory `/opt/src/cfengine-2.0.0/src'
make: *** [all-recursive] Error 1  

Aaaggghh!!!!!!

hhmmm, I comment out any code with references to IPv6

--- proto.c.orig        Tue Apr  2 16:36:56 2002
+++ proto.c     Tue Apr  2 16:37:32 2002
@@ -98,10 +98,10 @@
     {
     case AF_INET: len = sizeof(struct sockaddr_in);
        break;
-#if defined(HAVE_GETADDRINFO) && !defined(DARWIN)
+/* #if defined(HAVE_GETADDRINFO) && !defined(DARWIN)
     case AF_INET6: len = sizeof(struct sockaddr_in6);
        break;
-#endif
+#endif */
     default:
        CfLog(cferror,"Software error in IdentifyForVerification","");
     }


--- nameinfo.c.orig     Mon Mar  4 09:52:37 2002
+++ nameinfo.c  Tue Apr  2 16:40:00 2002
@@ -470,13 +470,15 @@
 char *sockaddr_ntop(struct sockaddr *sa)

 {
-#if defined(HAVE_GETADDRINFO) && !defined(DARWIN)
+/* #if defined(HAVE_GETADDRINFO) && !defined(DARWIN)
  static char addrbuf[INET6_ADDRSTRLEN];
  void *addr;
 #else
  static char addrbuf[20];
  struct in_addr addr;
-#endif
+#endif */
+ static char addrbuf[20];
+ struct in_addr addr;

 switch (sa->sa_family)
    {
@@ -485,13 +487,13 @@
        sprintf(addrbuf,"%.19s",inet_ntoa(((struct sockaddr_in 
*)sa)->sin_addr));
        break;

-#if defined(HAVE_GETADDRINFO) && !defined(DARWIN)
+/* #if defined(HAVE_GETADDRINFO) && !defined(DARWIN)
    case AF_INET6:
        Debug("IPV6 address\n");
        addr = &((struct sockaddr_in6 *)sa)->sin6_addr;
        inet_ntop(sa->sa_family,addr,addrbuf,sizeof(addrbuf));
        break;
-#endif
+#endif */
    default:
        Debug("Address family was %d\n",sa->sa_family);
        FatalError("Software failure in sockaddr_ntop\n"); 


gcc  -g -O2  -Wreturn-type -Wmissing-prototypes -Wuninitialized 
-L/usr/local/BerkeleyDB.4.0/lib -L/usr/local/ssl/lib  -o cfagent  cfagent.o 
init.o do.o wrapper.o report.o client.o ip.o process.o ifconf.o image.o item.o 
item-ext.o item-file.o 2Dlist.o globals.o classes.o misc.o parse.o functions.o 
edittools.o patches.o install.o link.o tidy.o filedir.o eval.o modes.o 
chflags.o locks.o mount.o macro.o filenames.o varstring.o wildcard.o cfparse.o 
comparray.o read.o checksums.o proto.o filters.o copy.o repository.o rotate.o 
errors.o cflex.o net.o df.o log.o crypto.o popen.o popen_def.o sensible.o acl.o 
dce_acl.o nameinfo.o strategies.o -lfl -ldb -lcrypto -lnss_nis -lpthread 
-lpthread -lm  -L../pub -lpub 
ip.o: In function `RemoteConnect':
/opt/src/cfengine-2.0.0/src/ip.c:59: undefined reference to `gai_strerror'
proto.o: In function `IdentifyForVerification':
/opt/src/cfengine-2.0.0/src/proto.c:121: undefined reference to `getnameinfo'
collect2: ld returned 1 exit status
make: *** [cfagent] Error 1 


if I change this line to undef I can compile cfengine,

src/conf.h: /* Define if you have the `getaddrinfo' function. */
src/conf.h: #undef HAVE_GETADDRINFO 

but also I can be missing any funcionality of cfengine.


Is it possible get cfengine work in this kernel without
these ugly hacks?

regards,

Note:  This machine is a hub in a hub-spoke topology with critical
       patches and I can't switch the kernel :-(
-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/IT d- s+:+() a- C+++ UBL+++$ P+ L+++ E--- W++ N+ o++ K- w---
O+ M+ V- PS+ PE+ Y++ PGP+>+++ t+ 5 X+$ R- tv-- b+++ DI D++>+++
G++ e- h+(++) !r !z
------END GEEK CODE BLOCK------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]