This commit is contained in:
Maximilian Röhrle 2018-08-30 14:45:28 +02:00
parent 020cc26b5c
commit d83d3d9172
2 changed files with 2 additions and 2 deletions

View File

@ -61,8 +61,8 @@ static int dump_to_file(const char *buffer, size_t size, void *data)
static int dump_to_fd(const char *buffer, size_t size, void *data) static int dump_to_fd(const char *buffer, size_t size, void *data)
{ {
int *dest = (int *)data;
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
int *dest = (int *)data;
if(write(*dest, buffer, size) == (ssize_t)size) if(write(*dest, buffer, size) == (ssize_t)size)
return 0; return 0;
#endif #endif

View File

@ -1034,8 +1034,8 @@ json_t *json_loadf(FILE *input, size_t flags, json_error_t *error)
static int fd_get_func(int *fd) static int fd_get_func(int *fd)
{ {
uint8_t c;
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
uint8_t c;
if (read(*fd, &c, 1) == 1) if (read(*fd, &c, 1) == 1)
return c; return c;
#endif #endif