aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/drivers/common/erl_efile.h
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/drivers/common/erl_efile.h')
-rw-r--r--erts/emulator/drivers/common/erl_efile.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/erts/emulator/drivers/common/erl_efile.h b/erts/emulator/drivers/common/erl_efile.h
index 3097ded3f1..349ab0e17b 100644
--- a/erts/emulator/drivers/common/erl_efile.h
+++ b/erts/emulator/drivers/common/erl_efile.h
@@ -118,6 +118,19 @@ typedef struct _Efile_info {
*/
} Efile_info;
+
+#ifdef HAVE_SENDFILE
+/*
+ * Described the structure of header/trailers for sendfile
+ */
+struct t_sendfile_hdtl {
+ SysIOVec *headers;
+ int hdr_cnt;
+ SysIOVec *trailers;
+ int trl_cnt;
+};
+#endif /* HAVE_SENDFILE */
+
/*
* Functions.
*/
@@ -162,3 +175,7 @@ int efile_symlink(Efile_error* errInfo, char* old, char* new);
int efile_may_openfile(Efile_error* errInfo, char *name);
int efile_fadvise(Efile_error* errInfo, int fd, Sint64 offset, Sint64 length,
int advise);
+#ifdef HAVE_SENDFILE
+int efile_sendfile(Efile_error* errInfo, int in_fd, int out_fd,
+ off_t *offset, Uint64 *nbytes, struct t_sendfile_hdtl *hdtl);
+#endif /* HAVE_SENDFILE */