aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpi <pi@FreeBSD.org>2014-08-16 04:24:06 +0800
committerpi <pi@FreeBSD.org>2014-08-16 04:24:06 +0800
commitb6e6f3f09c17f6dff01c99f8be124b119c1b3fb5 (patch)
tree52d3c1a7aa43b2b5de482e3fcc940ebd7936acaf
parentda0810ea72d739f6d998be8689085d5c4e0bae91 (diff)
downloadfreebsd-ports-gnome-b6e6f3f09c17f6dff01c99f8be124b119c1b3fb5.tar.gz
freebsd-ports-gnome-b6e6f3f09c17f6dff01c99f8be124b119c1b3fb5.tar.zst
freebsd-ports-gnome-b6e6f3f09c17f6dff01c99f8be124b119c1b3fb5.zip
net/libbgpdump: fix build with clang
PR: 191428 Submitted by: mjl@luckie.org.nz (maintainer)
-rw-r--r--net/libbgpdump/Makefile4
-rw-r--r--net/libbgpdump/files/patch-util.c29
2 files changed, 30 insertions, 3 deletions
diff --git a/net/libbgpdump/Makefile b/net/libbgpdump/Makefile
index 980982bb59c4..d8758bde4378 100644
--- a/net/libbgpdump/Makefile
+++ b/net/libbgpdump/Makefile
@@ -1,9 +1,8 @@
-# Created by: ijliao
# $FreeBSD$
PORTNAME= libbgpdump
PORTVERSION= 1.4.99.13
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= net
MASTER_SITES= http://www.ris.ripe.net/source/bgpdump/
EXTRACT_SUFX= .tgz
@@ -15,7 +14,6 @@ LICENSE= GPLv2
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
-USE_GCC= any
OPTIONS_DEFINE= DOCS EXAMPLES
diff --git a/net/libbgpdump/files/patch-util.c b/net/libbgpdump/files/patch-util.c
new file mode 100644
index 000000000000..c883c93f39ca
--- /dev/null
+++ b/net/libbgpdump/files/patch-util.c
@@ -0,0 +1,29 @@
+--- util.c.orig 2014-08-15 12:58:56.000000000 -0700
++++ util.c 2014-08-15 13:01:14.000000000 -0700
+@@ -29,6 +29,7 @@
+ #include <syslog.h>
+ #include <time.h>
+ #include <string.h>
++#include <inttypes.h>
+
+ static bool use_syslog = true;
+
+@@ -110,17 +111,7 @@
+
+ int int2str(uint32_t value, char* str)
+ {
+- const int LEN = 11;
+- char b[LEN];
+- int i = LEN;
+- b[i--] = '\0';
+-
+- do {
+- b[i--] = (char)(48 + (value % 10));
+- } while (value /= 10);
+-
+- memcpy(str, b + i + 1, LEN - i);
+- return LEN - i - 1;
++ return snprintf(str, 11, "%"PRIu32, value);
+ }
+
+ static void ti2s(uint32_t value) {