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

restrict SOCKET accept(SOCKET s, struct sockaddr *addr, int *addrlen) {
    void *fptr;
    SOCKET retval;

    fptr = dlsym(_ChSysSocket_handle, "accept_chdl");
    if(fptr == NULL)  {
       printf("Error: %s(): dlsym(): %s\n", __func__, dlerror());
       return -1;
    }
    dlrunfun(fptr, &retval, accept, s, addr, addrlen);
    return retval;
}
