pass HOST_ variables, not BUILD_
[buildroot.git] / package / ipsec-tools / ipsec-tools-0.6.7.100-do_not_use_addr_as_truthval.patch
blob4988ee5f3a34fda4543c542674f3f014c7090526
1 diff -rup ipsec-tools-0.6.6.oorig/src/racoon/eaytest.c ipsec-tools-0.6.6/src/racoon/eaytest.c
2 --- ipsec-tools-0.6.6.oorig/src/racoon/eaytest.c 2005-06-29 00:38:02.000000000 +0200
3 +++ ipsec-tools-0.6.6/src/racoon/eaytest.c 2006-10-11 16:01:45.000000000 +0200
4 @@ -311,7 +311,7 @@ certtest(ac, av)
6 printf("exact match: succeed.\n");
8 - if (dnstr_w1) {
9 + if (*dnstr_w1) {
10 asn1dn = eay_str2asn1dn(dnstr_w1, strlen(dnstr_w1));
11 if (asn1dn == NULL || asn1dn->l == asn1dn0.l)
12 errx(1, "asn1dn length wrong for wildcard 1\n");
13 @@ -321,7 +321,7 @@ certtest(ac, av)
14 printf("wildcard 1 match: succeed.\n");
17 - if (dnstr_w1) {
18 + if (*dnstr_w1) {
19 asn1dn = eay_str2asn1dn(dnstr_w2, strlen(dnstr_w2));
20 if (asn1dn == NULL || asn1dn->l == asn1dn0.l)
21 errx(1, "asn1dn length wrong for wildcard 2\n");
22 diff -rup ipsec-tools-0.6.6.oorig/src/racoon/var.h ipsec-tools-0.6.6/src/racoon/var.h
23 --- ipsec-tools-0.6.6.oorig/src/racoon/var.h 2004-11-20 17:16:59.000000000 +0100
24 +++ ipsec-tools-0.6.6/src/racoon/var.h 2006-10-11 16:00:15.000000000 +0200
25 @@ -76,9 +76,9 @@
26 do { \
27 if (getnameinfo((x), sysdep_sa_len(x), (y), sizeof(y), (z), sizeof(z), \
28 NIFLAGS) != 0) { \
29 - if (y) \
30 + if (*y) \
31 strncpy((y), "(invalid)", sizeof(y)); \
32 - if (z) \
33 + if (*z) \
34 strncpy((z), "(invalid)", sizeof(z)); \
35 } \
36 } while (0);
37 @@ -87,7 +87,7 @@ do { \
38 do { \
39 if (getnameinfo((x), sysdep_sa_len(x), (y), sizeof(y), NULL, 0, \
40 NIFLAGS) != 0) { \
41 - if (y) \
42 + if (*y) \
43 strncpy((y), "(invalid)", sizeof(y)); \
44 } \
45 } while (0);