openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/rsyslog/8.1903.0-r0/rsyslog-8.1903.0/runtime/net.c
static int mygetnameinfo(const struct sockaddr* sa, socklen_t salen, char* host,
                         size_t hostlen, char* serv, size_t servlen, int flags)
{
    int iCancelStateSave;
    int i;

    pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &iCancelStateSave);
    i = getnameinfo(sa, salen, host, hostlen, serv, servlen, flags);
    pthread_setcancelstate(iCancelStateSave, NULL);
    return i;
}
/* This is a cancel-safe getnameinfo() version, because we learned
 * (via drd/valgrind) that getnameinfo() seems to have some issues
 * when being cancelled, at least if the module was dlloaded.
 * rgerhards, 2008-09-30
 */
This is a cancel-safe getnameinfo() version, because we learned
(via drd/valgrind) that getnameinfo() seems to have some issues
when being cancelled, at least if the module was dlloaded.
This is a cancel - safe getnameinfo () version because we learned ( via drd / valgrind ) that getnameinfo () seems to have some issues when being cancelled at least if the module was dlloaded .
static int mygetnameinfo(const struct sockaddr* sa, socklen_t salen, char* host,
                         size_t hostlen, char* serv, size_t servlen, int flags)
{
    int iCancelStateSave;
    int i;
    pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &iCancelStateSave);
    i = getnameinfo(sa, salen, host, hostlen, serv, servlen, flags);
    pthread_setcancelstate(iCancelStateSave, NULL);
    return i;
}
static int mygetnameinfo ( const struct sockaddr * sa , socklen_t salen , char * host , size_t hostlen , char * serv , size_t servlen , int flags ) { int iCancelStateSave ; int i ; pthread_setcancelstate ( PTHREAD_CANCEL_DISABLE , & iCancelStateSave ) ; i = getnameinfo ( sa , salen , host , hostlen , serv , servlen , flags ) ; pthread_setcancelstate ( iCancelStateSave , NULL ) ; return i ; }
This is a cancel-safe getnameinfo() version, because we learned
 (via drd/valgrind) that getnameinfo() seems to have some issues
 when being cancelled, at least if the module was dlloaded.
This is a cancel - safe getnameinfo () version because we learned ( via drd / valgrind ) that getnameinfo () seems to have some issues when being cancelled at least if the module was dlloaded .