/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
int getservent_r(struct servent *resultbuf, char *buf, size_t buflen, struct servent ** result) {
    void *fptr;
    int retval;

    fptr = dlsym(_ChNetdb_handle, "getservent_r_chdl");
    if(fptr == NULL) {
        fprintf(_stderr, "Error: %s(): dlsym(): %s\n", __func__,  dlerror());
        return -1;
    }
    dlrunfun(fptr, &retval,getservent_r, resultbuf, buf, buflen, result);
    return retval;
}
