[hackers] [9base] applied David Galos musl compile patch, thanks || Anselm R Garbe
commit 45d1314a1bd1886c42c1bdaac4a0128f23f50e32
Author: Anselm R Garbe <anselm_AT_garbe.us>
Date: Sat Apr 27 21:07:51 2013 +0200
applied David Galos musl compile patch, thanks
diff --git a/lib9/_p9dir.c b/lib9/_p9dir.c
index b49cd4d..706130c 100644
--- a/lib9/_p9dir.c
+++ b/lib9/_p9dir.c
_AT_@ -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>
diff --git a/lib9/dirread.c b/lib9/dirread.c
index c339e8d..aad4c36 100644
--- a/lib9/dirread.c
+++ b/lib9/dirread.c
_AT_@ -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)
diff --git a/lib9/libc.h b/lib9/libc.h
index 0a7625f..66936e2 100644
--- a/lib9/libc.h
+++ b/lib9/libc.h
_AT_@ -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
diff --git a/lib9/readcons.c b/lib9/readcons.c
index 8de44b8..fb7b0f3 100644
--- a/lib9/readcons.c
+++ b/lib9/readcons.c
_AT_@ -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)
Received on Sat Apr 27 2013 - 21:07:20 CEST
This archive was generated by hypermail 2.3.0
: Sat Apr 27 2013 - 21:12:14 CEST