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

restrict ssize_t recv(int s, void *buf, size_t len, int flags) {
    void *fptr;
    ssize_t retval;

    fptr = dlsym(_ChSysSocket_handle, "recv_chdl");
    if(fptr == NULL) {
        fprintf(_stderr, "Error: %s(): dlsym(): %s\n", __func__,  dlerror());
        return -1;
    }
    dlrunfun(fptr, &retval, recv, s, buf, len, flags);
    return retval;
}
