(trunk) #7 DHT: apply jch's dht-warnings.patch

This commit is contained in:
Charles Kerr 2009-05-20 13:42:11 +00:00
parent d0a84bcf09
commit a5d9578477
1 changed files with 3 additions and 1 deletions

View File

@ -45,9 +45,11 @@ THE SOFTWARE.
#include "dht.h"
#ifndef HAVE_MEMMEM
#ifdef __GLIBC__
#define HAVE_MEMMEM
#endif
#endif
#ifndef MSG_CONFIRM
#define MSG_CONFIRM 0
@ -2094,7 +2096,7 @@ memmem(const void *haystack, size_t haystacklen,
for(i = 0; i < haystacklen - needlelen; i++) {
if(memcmp(h + i, n, needlelen) == 0)
return h + i;
return (void*)(h + i);
}
return NULL;
}