[sysprof] capture: use unistd types
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] capture: use unistd types
- Date: Mon, 6 May 2019 23:40:08 +0000 (UTC)
commit b6d24dafcfbeaea001828fb376fe4f424427c13f
Author: Christian Hergert <chergert redhat com>
Date: Mon May 6 16:39:41 2019 -0700
capture: use unistd types
lib/capture/sp-capture-util-private.h | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/lib/capture/sp-capture-util-private.h b/lib/capture/sp-capture-util-private.h
index 8a4f40d..bc96fe3 100644
--- a/lib/capture/sp-capture-util-private.h
+++ b/lib/capture/sp-capture-util-private.h
@@ -30,15 +30,15 @@
#ifdef __linux__
# define _sp_sendfile sendfile
#else
-static inline gssize
-_sp_sendfile (gint out_fd,
- gint in_fd,
- goffset *offset,
- gsize count)
+static inline ssize_t
+_sp_sendfile (int out_fd,
+ int in_fd,
+ off_t *offset,
+ size_t count)
{
- gssize total = 0;
- goffset wpos = 0;
- goffset rpos = 0;
+ ssize_t total = 0;
+ off_t wpos = 0;
+ off_t rpos = 0;
errno = 0;
@@ -47,11 +47,11 @@ _sp_sendfile (gint out_fd,
while (count > 0)
{
- guint8 buf[4096*4];
- gssize n_written = 0;
- gssize n_read;
- goffset off = 0;
- gsize to_read;
+ unsigned char buf[4096*4];
+ ssize_t n_written = 0;
+ ssize_t n_read;
+ off_t off = 0;
+ size_t to_read;
/* Try to page align */
if ((rpos % 4096) != 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]