[Ipsec-tools-devel] could not compile ipsec-tools-0.6.1rc1
Brought to you by:
mit_warlord,
netbsd
From: Joy L. <la...@au...> - 2005-09-07 23:22:32
|
I downloaded ipsec-tools-0.6.1rc1 and was unable to compile it. It seems that "-Werror" is automatically set in the Makefiles, such that compilation issues that would produce warnings end in errors. I have sifted through these errors and have included a patch. If I have compiled incorrectly or missed something, please let me know. In src/libipsec/policy_parse.y, pbuf was changed from being declared as "caddr_t" to "u_int8_t *". However, this causes an error when later in set_x_request(), when "pbuf = n", but n is declared as caddr_t. The others required a typecast. Regards, Joy Latten diff -urpN ipsec-tools-0.6.1rc1.orig/src/libipsec/policy_parse.y ipsec-tools-0.6.1rc1.new/src/libipsec/policy_parse.y --- ipsec-tools-0.6.1rc1.orig/src/libipsec/policy_parse.y 2005-09-07 11:09:10.000000000 -0500 +++ ipsec-tools-0.6.1rc1.new/src/libipsec/policy_parse.y 2005-09-07 12:02:16.000000000 -0500 @@ -99,7 +99,7 @@ #define ATOX(c) \ (isdigit(c) ? (c - '0') : (isupper(c) ? (c - 'A' + 10) : (c - 'a' + 10) )) -static u_int8_t *pbuf = NULL; /* sadb_x_policy buffer */ +static caddr_t pbuf = NULL; /* sadb_x_policy buffer */ static int tlen = 0; /* total length of pbuf */ static int offset = 0; /* offset of pbuf */ static int p_dir, p_type, p_protocol, p_mode, p_level, p_reqid; diff -urpN ipsec-tools-0.6.1rc1.orig/src/racoon/isakmp.c ipsec-tools-0.6.1rc1.new/src/racoon/isakmp.c --- ipsec-tools-0.6.1rc1.orig/src/racoon/isakmp.c 2005-09-07 11:09:10.000000000 -0500 +++ ipsec-tools-0.6.1rc1.new/src/racoon/isakmp.c 2005-09-07 17:56:15.000000000 -0500 @@ -205,7 +205,7 @@ isakmp_handler(so_isakmp) /* read message by MSG_PEEK */ while ((len = recvfromto(so_isakmp, x.buf, sizeof(x), - MSG_PEEK, (struct sockaddr *)&remote, &remote_len, + MSG_PEEK, (struct sockaddr *)&remote, (int *)&remote_len, (struct sockaddr *)&local, &local_len)) < 0) { if (errno == EINTR) continue; @@ -282,7 +282,7 @@ isakmp_handler(so_isakmp) } while ((len = recvfromto(so_isakmp, (char *)tmpbuf->v, tmpbuf->l, - 0, (struct sockaddr *)&remote, &remote_len, + 0, (struct sockaddr *)&remote, (int *)&remote_len, (struct sockaddr *)&local, &local_len)) < 0) { if (errno == EINTR) continue; diff -urpN ipsec-tools-0.6.1rc1.orig/src/racoon/oakley.c ipsec-tools-0.6.1rc1.new/src/racoon/oakley.c --- ipsec-tools-0.6.1rc1.orig/src/racoon/oakley.c 2005-09-07 11:09:10.000000000 -0500 +++ ipsec-tools-0.6.1rc1.new/src/racoon/oakley.c 2005-09-07 17:38:18.000000000 -0500 @@ -2259,7 +2259,7 @@ save_certx509(cert) new = NULL; return NULL; } - bp = new->pl->v; + bp = (u_char *)new->pl->v; len = i2d_X509(cert, &bp); new->type = ISAKMP_CERT_X509SIGN; new->cert.v = new->pl->v; |