libowfat/trybsdsf.c
leitner 35942878c2 $ make WERROR=-Werror now builds with -Werror
add some single char escaping routines to fmt.h
pull in html5 entities from w3c and use those to do a proper scan_html decoding
fix an off-by-one in fmt_to_array
add a ton of unit tests for the fmt routines
2014-03-13 22:25:20 +00:00

22 lines
411 B
C

/* for macos X, don't ask */
#define SENDFILE 1
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
#include <errno.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
int main() {
struct sf_hdtr hdr;
struct iovec v[17+23];
int r,fd=1;
off_t sbytes;
hdr.headers=v; hdr.hdr_cnt=17;
hdr.trailers=v+17; hdr.trl_cnt=23;
r=sendfile(0,1,37,42,&hdr,&sbytes,0);
(void)r;
return 0;
}