/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

unsigned long inet_addr(char *cp) {
    void *fptr;
    unsigned long retval;

    fptr = dlsym(_ChArpaInet_handle, "inet_addr_chdl");
    if(fptr == NULL)  {
       printf("Error: %s(): dlsym(): %s\n", __func__, dlerror());
       return -1;
    }
    dlrunfun(fptr, &retval, inet_addr, cp);
    return retval;
}
