Ticket #7: dht-warnings.patch

File dht-warnings.patch, 612 bytes (added by jch, 13 years ago)
  • third-party/dht/dht.c

     
    4545
    4646#include "dht.h"
    4747
    48 #ifdef __GLIBC__
    49 #define HAVE_MEMMEM
    50 #endif
     48#ifndef HAVE_MEMMEM
     49#ifdef __GLIBC__
     50#define HAVE_MEMMEM
     51#endif
     52#endif
    5153
    5254#ifndef MSG_CONFIRM
    5355#define MSG_CONFIRM 0
     
    20942096
    20952097    for(i = 0; i < haystacklen - needlelen; i++) {
    20962098        if(memcmp(h + i, n, needlelen) == 0)
    2097             return h + i;
     2099            return (void*)(h + i);
    20982100    }
    20992101    return NULL;
    21002102}