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

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