mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-22 20:41:26 +00:00
- Unbroke with threaded Mesa libraries (XFree86-4);
- provide workaround for sscanf(3) bug in 5-CURRENT, that causes SIGBUS.
This commit is contained in:
parent
39e23c183a
commit
c6e3cec631
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=43425
@ -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
|
||||
|
||||
|
27
net/xtraceroute/files/patch-util.c
Normal file
27
net/xtraceroute/files/patch-util.c
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user