aboutsummaryrefslogtreecommitdiffstats
path: root/net/xtraceroute
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2001-06-02 19:23:26 +0800
committersobomax <sobomax@FreeBSD.org>2001-06-02 19:23:26 +0800
commitd811eda123796de04c70dee976404c46da4ab2f8 (patch)
treedc2652e2a4a90b8327bc165845fd2dbcf0608525 /net/xtraceroute
parent7206bcae2bf18559ed0f93b48284a0fdd06df4ce (diff)
downloadfreebsd-ports-gnome-d811eda123796de04c70dee976404c46da4ab2f8.tar.gz
freebsd-ports-gnome-d811eda123796de04c70dee976404c46da4ab2f8.tar.zst
freebsd-ports-gnome-d811eda123796de04c70dee976404c46da4ab2f8.zip
- Unbroke with threaded Mesa libraries (XFree86-4);
- provide workaround for sscanf(3) bug in 5-CURRENT, that causes SIGBUS.
Diffstat (limited to 'net/xtraceroute')
-rw-r--r--net/xtraceroute/Makefile4
-rw-r--r--net/xtraceroute/files/patch-util.c27
2 files changed, 29 insertions, 2 deletions
diff --git a/net/xtraceroute/Makefile b/net/xtraceroute/Makefile
index ddb694f78e45..a718d3737ae2 100644
--- a/net/xtraceroute/Makefile
+++ b/net/xtraceroute/Makefile
@@ -22,8 +22,8 @@ USE_GTK= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-GL-prefix=${X11BASE}/lib \
--with-lib-GL
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
- LIBS="-L${LOCALBASE}/lib"
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}" \
+ LIBS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
DATAFILES= ndg_files.tar.gz
diff --git a/net/xtraceroute/files/patch-util.c b/net/xtraceroute/files/patch-util.c
new file mode 100644
index 000000000000..ecf92fab3ea9
--- /dev/null
+++ b/net/xtraceroute/files/patch-util.c
@@ -0,0 +1,27 @@
+Workaround for a sscanf(3) bug in the FreeBSD 5-CURRENT.
+
+$FreeBSD$
+
+--- util.c 2001/06/02 10:41:42 1.1
++++ util.c 2001/06/02 11:14:20
+@@ -36,10 +36,19 @@
+ double loc = 0;
+ float sub;
+ int i = 0;
++ int len;
++ char *tmp;
++
++ len = strlen(str);
++ if (str[len - 1] == 'e') {
++ tmp = alloca(len);
++ strlcpy(tmp, str, len);
++ } else
++ tmp = str;
+
+ while(1)
+ {
+- sscanf(&str[i], "%f", &sub);
++ sscanf(&tmp[i], "%f", &sub);
+ loc += sub*factor;
+
+ // Skip all spaces and tabs