source: packages/net/mtr/patches/502-fix-res_ninit.patch @ 22014

Last change on this file since 22014 was 22014, checked in by acoul, 6 years ago

net/mtr: update to mtr-0.79 & fix compile issues

File size: 1.2 KB
  • dns.c

    a b char nullstring[] = ""; 
    309309 
    310310int use_dns = 1; 
    311311 
    312 #ifdef res_ninit 
    313 #define RES_INIT() res_ninit(&myres); 
    314 #define RES_MKQUERY(a, b, c, d, e, f, g, h, i) \ 
    315     res_nmkquery(&myres, a, b, c, d, e, f, g, h, i) 
    316 struct __res_state myres; 
    317 #else 
     312//#ifdef res_ninit 
     313//#define RES_INIT() res_ninit(&myres); 
     314//#define RES_MKQUERY(a, b, c, d, e, f, g, h, i) \ 
     315//    res_nmkquery(&myres, a, b, c, d, e, f, g, h, i) 
     316//struct __res_state myres; 
     317//#else 
    318318#define RES_INIT() res_init(); 
    319319#define RES_MKQUERY(a, b, c, d, e, f, g, h, i) \ 
    320320    res_mkquery(a, b, c, d, e, f, g, h, i) 
    321321#define myres _res 
    322 #endif 
     322//#endif 
    323323 
    324324/* Code */ 
    325325#ifdef CorruptCheck 
    res_nmkquery(res_state statp, 
    12741274#if 0 
    12751275        hp->id = htons(++statp->id); 
    12761276#else 
    1277         hp->id = htons(statp->id); 
     1277//        hp->id = htons(statp->id); 
    12781278        int randombits; 
    12791279        do 
    12801280          { 
    res_nmkquery(res_state statp, 
    12871287#endif 
    12881288          } 
    12891289        while ((randombits & 0xffff) == 0); 
    1290         statp->id = (statp->id + randombits) & 0xffff; 
     1290//        statp->id = (statp->id + randombits) & 0xffff; 
    12911291#endif 
    12921292        hp->opcode = op; 
    12931293        hp->rd = (statp->options & RES_RECURSE) != 0; 
Note: See TracBrowser for help on using the repository browser.