mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-09 22:50:54 +00:00
capture: use unistd types
This commit is contained in:
@ -30,15 +30,15 @@
|
|||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
# define _sp_sendfile sendfile
|
# define _sp_sendfile sendfile
|
||||||
#else
|
#else
|
||||||
static inline gssize
|
static inline ssize_t
|
||||||
_sp_sendfile (gint out_fd,
|
_sp_sendfile (int out_fd,
|
||||||
gint in_fd,
|
int in_fd,
|
||||||
goffset *offset,
|
off_t *offset,
|
||||||
gsize count)
|
size_t count)
|
||||||
{
|
{
|
||||||
gssize total = 0;
|
ssize_t total = 0;
|
||||||
goffset wpos = 0;
|
off_t wpos = 0;
|
||||||
goffset rpos = 0;
|
off_t rpos = 0;
|
||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
|
||||||
@ -47,11 +47,11 @@ _sp_sendfile (gint out_fd,
|
|||||||
|
|
||||||
while (count > 0)
|
while (count > 0)
|
||||||
{
|
{
|
||||||
guint8 buf[4096*4];
|
unsigned char buf[4096*4];
|
||||||
gssize n_written = 0;
|
ssize_t n_written = 0;
|
||||||
gssize n_read;
|
ssize_t n_read;
|
||||||
goffset off = 0;
|
off_t off = 0;
|
||||||
gsize to_read;
|
size_t to_read;
|
||||||
|
|
||||||
/* Try to page align */
|
/* Try to page align */
|
||||||
if ((rpos % 4096) != 0)
|
if ((rpos % 4096) != 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user