aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-06-27 23:35:04 +0000
committerNick Mathewson <nickm@torproject.org>2005-06-27 23:35:04 +0000
commit806da0d8b2584fe741847d3b6f4cb4266c6a9080 (patch)
tree4de9c9befb721ee5b85b0f45e44cc1ffc7c76ca7 /src/common
parent30571317dda56a83eeb077af5f1fefc61c7d3c9c (diff)
downloadtor-806da0d8b2584fe741847d3b6f4cb4266c6a9080.tar
tor-806da0d8b2584fe741847d3b6f4cb4266c6a9080.tar.gz
Compile on win32
svn:r4496
Diffstat (limited to 'src/common')
-rw-r--r--src/common/compat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index 7f0823bbe..d2abc2af5 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -143,14 +143,16 @@ tor_vsnprintf(char *str, size_t size, const char *format, va_list args)
* Requires that nlen be greater than zero.
*/
const void *
-tor_memmem(const void *haystack, size_t hlen, const void *needle, size_t nlen)
+tor_memmem(const void *_haystack, size_t hlen, const void *_needle, size_t nlen)
{
#if defined(HAVE_MEMMEM) && (!defined(__GNUC__) || __GNUC__ >= 2)
tor_assert(nlen);
return memmem(haystack, hlen, needle, nlen);
#else
/* This isn't as fast as the GLIBC implementation, but it doesn't need to be. */
- const void *p, *end;
+ const char *p, *end;
+ const char *haystack = (const char*)_haystack;
+ const char *needle = (const char*)_needle;
char first;
tor_assert(nlen);