-/* $OpenBSD: rde.c,v 1.622 2024/02/03 00:11:34 jsg Exp $ */
+/* $OpenBSD: rde.c,v 1.623 2024/02/22 06:45:22 miod Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
if (imsg_get_data(&imsg, &roa, sizeof(roa)) == -1)
fatalx("IMSG_RECONF_ROA_ITEM bad len");
if (trie_roa_add(&roa_new.th, &roa) != 0) {
+#if defined(__GNUC__) && __GNUC__ < 4
+ struct bgpd_addr p = {
+ .aid = roa.aid
+ };
+ p.v6 = roa.prefix.inet6;
+#else
struct bgpd_addr p = {
.aid = roa.aid,
.v6 = roa.prefix.inet6
};
+#endif
log_warnx("trie_roa_add %s/%u failed",
log_addr(&p), roa.prefixlen);
}
-/* $OpenBSD: util.c,v 1.81 2024/02/02 16:14:51 claudio Exp $ */
+/* $OpenBSD: util.c,v 1.82 2024/02/22 06:45:22 miod Exp $ */
/*
* Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org>
log_roa(struct roa *roa)
{
static char buf[256];
- struct bgpd_addr addr = { .aid = roa->aid, .v6 = roa->prefix.inet6 };
char maxbuf[32];
+#if defined(__GNUC__) && __GNUC__ < 4
+ struct bgpd_addr addr = { .aid = roa->aid };
+ addr.v6 = roa->prefix.inet6;
+#else
+ struct bgpd_addr addr = { .aid = roa->aid, .v6 = roa->prefix.inet6 };
+#endif
maxbuf[0] = '\0';
if (roa->prefixlen != roa->maxlen)