VCL-LDPRELOAD: add sendfile/sendfile64 implementation.
[vpp.git] / src / vcl / vcom_socket_wrapper.h
index 9e85ecf..ce03ebe 100644 (file)
@@ -66,6 +66,7 @@
 #include <poll.h>
 #include <sys/uio.h>
 #include <stdlib.h>
+#include <vcl/vcom.h>
 
 
 /* GCC have printf type attribute check. */
  * has probably something todo with with the linker.
  * So we need load each function at the point it is called the first time.
  */
-#ifdef HAVE_ACCEPT4
-int
-libc_accept4 (int sockfd,
-             struct sockaddr *addr, socklen_t * addrlen, int flags);
-#else /* HAVE_ACCEPT4 */
+int libc_accept4 (int sockfd, struct sockaddr *addr, socklen_t * addrlen,
+                 int flags);
+
 int libc_accept (int sockfd, struct sockaddr *addr, socklen_t * addrlen);
-#endif /* HAVE_ACCEPT4 */
 
 int libc_bind (int sockfd, const struct sockaddr *addr, socklen_t addrlen);
 
@@ -161,6 +159,8 @@ int libc_recvmsg (int sockfd, struct msghdr *msg, int flags);
 
 int libc_send (int sockfd, const void *buf, size_t len, int flags);
 
+ssize_t libc_sendfile (int out_fd, int in_fd, off_t * offset, size_t len);
+
 int libc_sendmsg (int sockfd, const struct msghdr *msg, int flags);
 
 int