source: packages/net/netperf/patches/001-dccp.patch @ 22020

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

net/netperf: fix SOCK_DCCP compile issue (uClibc 0.9.31)

File size: 1.4 KB
  • netperf-2.4.5

    [PATCH] fix build on systems where IPROTO_DCCP is defined, but SOCK_DCCP isn't
    
    On some systems (E.G. uClibc 0.9.31) IPROTO_DCCP is defined, but SOCK_DCCP
    isn't - Causing the build to break. Fix it by checking for both before
    using.
    
    Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
    ---
     src/netsh.c       |    2 +-
     src/nettest_bsd.c |    2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    old new parse_protocol(char protocol_string[]) 
    452452    return IPPROTO_SDP; 
    453453  } 
    454454#endif 
    455 #ifdef IPPROTO_DCCP 
     455#if defined(IPPROTO_DCCP) && defined(SOCK_DCCP) 
    456456  if (!strcasecmp(temp,"dccp")) { 
    457457    socket_type = SOCK_DCCP; 
    458458    return IPPROTO_DCCP; 
  • src/nettest_bsd.c

    old new complete_addrinfo(char *controlhost, cha 
    712712         that we did this so the code for the Solaris kludge can do 
    713713         the fix-up for us.  also flip error over to EAI_AGAIN and 
    714714         make sure we don't "count" this time around the loop. */ 
    715 #if defined(IPPROTO_DCCP) 
     715#if defined(IPPROTO_DCCP) && defined(SOCK_DCCP) 
    716716      /* only tweak on this one the second time around, after we've 
    717717         kludged the ai_protocol field */ 
    718718      if ((hints.ai_socktype == SOCK_DCCP) && 
Note: See TracBrowser for help on using the repository browser.