}
static int
-xwrite (int fd, const void *buf, size_t len)
+xwrite (int fd, const void *v_buf, size_t len)
{
+ const char *buf = v_buf;
int r;
while (len > 0) {
}
static int
-xread (int fd, void *buf, size_t len)
+xread (int fd, void *v_buf, size_t len)
{
+ char *buf = v_buf;
int r;
while (len > 0) {
if (buf) {
*buf = safe_realloc (g, *buf, len + ctx.chunks[i].data.data_len);
- memcpy (*buf+len, ctx.chunks[i].data.data_val,
+ memcpy (((char *)*buf)+len, ctx.chunks[i].data.data_val,
ctx.chunks[i].data.data_len);
}
len += ctx.chunks[i].data.data_len;