Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
alpine
alpine-conf
Commits
53024066
Commit
53024066
authored
May 20, 2016
by
Natanael Copa
Browse files
uniso: fix build on OSX
parent
c46b751f
Changes
1
Hide whitespace changes
Inline
Side-by-side
uniso.c
View file @
53024066
...
...
@@ -24,15 +24,26 @@
#include <stdio.h>
#include <fcntl.h>
#include <wchar.h>
#include <malloc.h>
#include <unistd.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <endian.h>
#include <sys/stat.h>
#include <sys/types.h>
#if defined(__linux__)
# include <malloc.h>
# include <endian.h>
#elif defined(__APPLE__)
# include <libkern/OSByteOrder.h>
# define be16toh(x) OSSwapBigToHostInt16(x)
#endif
#ifndef EMEDIUMTYPE
#define EMEDIUMTYPE EILSEQ
#endif
/**/
#ifndef container_of
...
...
@@ -215,6 +226,7 @@ struct uniso_context {
unsigned
char
*
tmpbuf
;
};
#if defined(__linux__)
static
int
do_splice
(
struct
uniso_context
*
ctx
,
int
to_fd
,
int
bytes
)
{
int
r
,
left
;
...
...
@@ -230,6 +242,9 @@ static int do_splice(struct uniso_context *ctx, int to_fd, int bytes)
return
bytes
;
}
#else
#define do_splice(ctx,to_fd,bytes) (-1)
#endif
static
int
do_read
(
struct
uniso_context
*
ctx
,
unsigned
char
*
buf
,
int
bytes
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment