applied David Galos musl compile patch, thanks

This commit is contained in:
Anselm R Garbe
2013-04-27 21:07:51 +02:00
parent 51cdf1141e
commit 45d1314a1b
4 changed files with 11 additions and 2 deletions

View File

@@ -61,7 +61,7 @@ disksize(int fd, struct stat *st)
return (vlong)lab.d_partitions[n].p_size * lab.d_secsize;
}
#elif defined(__linux__)
#elif defined(__linux__) && !defined(__MUSL__)
#include <linux/hdreg.h>
#include <linux/fs.h>
#include <sys/ioctl.h>

View File

@@ -21,6 +21,12 @@ static int
mygetdents(int fd, struct dirent *buf, int n) {
return syscall (getdents, fd, (void*) buf, n);
}
# elif defined(__MUSL__)
static int
mygetdents(int fd, struct dirent *buf, int n)
{
return getdents(fd, (void*)buf, n);
}
# else
static int
mygetdents(int fd, struct dirent *buf, int n)

View File

@@ -438,6 +438,7 @@ extern void (*_unpin)(void);
#define decrypt p9decrypt
#define getenv p9getenv
#define getwd p9getwd
#undef longjmp
#define longjmp p9longjmp
#undef setjmp
#define setjmp p9setjmp

View File

@@ -2,7 +2,9 @@
#define NOPLAN9DEFINES
#include <libc.h>
#include <termios.h>
#include <sys/termios.h>
#ifndef __MUSL__
# include <sys/termios.h>
#endif
static int
rawx(int fd, int echoing)