Commit Graph

3 Commits

Author SHA1 Message Date
ac1767eff2 capture: add some portability fallbacks
If we're on non-Linux, we can use some portability fallbacks to
get similar behavior to Linux. I'm sure we can optimize this a
bit more for FreeBSD if someone with that installed wants to
come look at things and improve them.
2019-05-06 20:07:29 -07:00
b6d24dafcf capture: use unistd types 2019-05-06 16:39:41 -07:00
0580b4ef0d capture: add sendfile() fallback
We want the capture format to be usable on systems other than
Linux so that it can be used in places like GTK. To do this,
we need a sendfile() fallback that can be portable/useful on
those systems.

FreeBSD has sendfile(), but the semantics differ slightly. This
implementation will walk up to the nearest page size and then
do page aligned pread()/write() which is likely good enough of
an implementation anyway.
2019-05-06 16:20:14 -07:00