Fix build on SunOS: link network libs and needed an include for sys/mkdev.h

This commit is contained in:
wiedi 2014-02-09 17:23:54 +00:00
parent f5d71807fd
commit ab1b475748
4 changed files with 28 additions and 14 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.4 2012/10/03 16:08:33 asau Exp $
# $NetBSD: Makefile,v 1.5 2014/02/09 17:23:54 wiedi Exp $
#
DISTNAME= u9fs-2.0.3
@ -13,4 +13,6 @@ WRKSRC= ${WRKDIR}/u9fs
MAKE_FILE= makefile
LDFLAGS.SunOS+= -lsocket -lnsl
.include "../../mk/bsd.pkg.mk"

View file

@ -1,10 +1,10 @@
$NetBSD: distinfo,v 1.4 2011/01/06 05:03:30 agc Exp $
$NetBSD: distinfo,v 1.5 2014/02/09 17:23:54 wiedi Exp $
SHA1 (u9fs-2.0.3.tar.gz) = 98b6d1b26a516761ee392d2c3ed15528af84601b
RMD160 (u9fs-2.0.3.tar.gz) = 460879d27c4d282a3b4822c194b2abf458851b4d
Size (u9fs-2.0.3.tar.gz) = 42325 bytes
SHA1 (patch-aa) = 2a8f531d85187737b779fe6e339def22ae3c76e5
SHA1 (patch-ab) = c5fe5cdc5fccca3085f6c6542496623d43928bfe
SHA1 (patch-aa) = 790924f9761fc90cb8db2b4ca0385eca864dfc73
SHA1 (patch-ab) = 34a5460b9a3d527e65e31940f66a83d295ac3ef1
SHA1 (patch-ac) = 7251853f1dc6cecaaf67c617e5dfb74ecae12b19
SHA1 (patch-ad) = d7a26f4db9eb543ee47dc621b7a79be11d4f42cd
SHA1 (patch-ae) = 8fd3ddbe26275361878c5820f46092005f36f887

View file

@ -1,8 +1,17 @@
$NetBSD: patch-aa,v 1.3 2009/07/08 16:44:49 joerg Exp $
$NetBSD: patch-aa,v 1.4 2014/02/09 17:23:54 wiedi Exp $
--- makefile 2007/04/23 21:54:35 1.1
+++ makefile 2007/04/23 21:55:35
@@ -49,16 +49,19 @@
--- makefile.orig 2005-06-06 19:26:52.000000000 +0000
+++ makefile
@@ -17,7 +17,7 @@
#CC=cc
CFLAGS=-g -I.
LD=cc
-LDFLAGS=
+#LDFLAGS=
LDTAIL=
OFILES=\
@@ -49,16 +49,19 @@ HFILES=\
fcall.h\
plan9.h

View file

@ -1,14 +1,17 @@
$NetBSD: patch-ab,v 1.2 2011/01/06 05:03:31 agc Exp $
$NetBSD: patch-ab,v 1.3 2014/02/09 17:23:54 wiedi Exp $
--- u9fs.c 2007/04/23 22:01:05 1.1
+++ u9fs.c 2007/04/23 22:29:28
@@ -28,7 +28,14 @@
--- u9fs.c.orig 2005-06-06 19:26:52.000000000 +0000
+++ u9fs.c
@@ -28,7 +28,17 @@
#define DEFAULTLOG "/tmp/u9fs.log"
#endif
+#if __linux__
#include <linux/kdev_t.h>
+#elif defined(__NetBSD__) || defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__)
+#elif defined(__NetBSD__) || defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__sun)
+#if defined(__sun)
+# include <sys/mkdev.h>
+#endif
+#include <sys/types.h>
+#define MAJOR(m) major(m)
+#define MINOR(m) minor(m)
@ -17,7 +20,7 @@ $NetBSD: patch-ab,v 1.2 2011/01/06 05:03:31 agc Exp $
char *logfile = DEFAULTLOG;
char *rootpath = "/";
@@ -752,11 +759,11 @@
@@ -752,11 +762,11 @@ stat2dir(char *path, struct stat *st, Di
}
d->extension = estrdup(link);
} else if (d->mode&DMDEVICE) {