summaryrefslogtreecommitdiff
path: root/net/openbgpd/files/patch-bgpctl_bgpctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/openbgpd/files/patch-bgpctl_bgpctl.c')
-rw-r--r--net/openbgpd/files/patch-bgpctl_bgpctl.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/net/openbgpd/files/patch-bgpctl_bgpctl.c b/net/openbgpd/files/patch-bgpctl_bgpctl.c
new file mode 100644
index 000000000000..308e4fc8bdf1
--- /dev/null
+++ b/net/openbgpd/files/patch-bgpctl_bgpctl.c
@@ -0,0 +1,26 @@
+--- bgpctl/bgpctl.c.orig Tue Jan 24 15:28:03 2006
++++ bgpctl/bgpctl.c Mon Mar 20 11:55:29 2006
+@@ -29,7 +29,11 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
++#if defined(__OpenBSD__)
+ #include <util.h>
++#else /* defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) */
++#include <libutil.h>
++#endif
+
+ #include "bgpd.h"
+ #include "session.h"
+@@ -1032,7 +1039,11 @@
+ {
+ static char buf[16];
+
++#if defined(__OpenBSD__)
+ if (fmt_scaled(num, buf) == -1)
++#else /* defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) */
++ if (humanize_number(buf, 16, num, "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL) == -1)
++#endif
+ snprintf(buf, sizeof(buf), "%lldB", num);
+
+ return (buf);