diff options
author | kris <kris@FreeBSD.org> | 2007-07-27 08:49:43 +0800 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2007-07-27 08:49:43 +0800 |
commit | 85c85085a6e711f9f415d79538d63adaad278000 (patch) | |
tree | 8de25a995cca4a167fbb648faadcdbae0a278fe6 /benchmarks | |
parent | 5fe05462af8b986f64ed86834e9c371f72f88aad (diff) | |
download | freebsd-ports-gnome-85c85085a6e711f9f415d79538d63adaad278000.tar.gz freebsd-ports-gnome-85c85085a6e711f9f415d79538d63adaad278000.tar.zst freebsd-ports-gnome-85c85085a6e711f9f415d79538d63adaad278000.zip |
Fix build with gcc 4.2
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/super-smack/files/patch-query.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/benchmarks/super-smack/files/patch-query.cc b/benchmarks/super-smack/files/patch-query.cc new file mode 100644 index 000000000000..339e7c1a7feb --- /dev/null +++ b/benchmarks/super-smack/files/patch-query.cc @@ -0,0 +1,20 @@ +--- src/query.cc.orig 2005-04-30 09:51:29.000000000 -0400 ++++ src/query.cc 2007-07-26 20:47:03.000000000 -0400 +@@ -197,7 +197,7 @@ + { + string s((*i).first); + int str_len = (*i).first.length(); +- if((unsigned)p + str_len + 3 *sizeof(int) < (unsigned)p_end ) ++ if(p + str_len + 3 *sizeof(int) < p_end ) + { + *p++ = (char) str_len; + const char* q_type_name = s.c_str(); +@@ -216,7 +216,7 @@ + die(0, "report buffer overflow -- too many query types"); + } + +- len = (unsigned)p - (unsigned)buf; ++ len = p - buf; + *(buf) = num_recs; + + if(write(fd, buf, len) != len) |