summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package/rarpd/patches/patch-Makefile_in9
-rw-r--r--tools/cpio/src/cpio.c15
2 files changed, 21 insertions, 3 deletions
diff --git a/package/rarpd/patches/patch-Makefile_in b/package/rarpd/patches/patch-Makefile_in
new file mode 100644
index 000000000..58be90d10
--- /dev/null
+++ b/package/rarpd/patches/patch-Makefile_in
@@ -0,0 +1,9 @@
+--- rarpd-1.1.orig/Makefile.in 1999-10-20 22:57:13.000000000 +0200
++++ rarpd-1.1/Makefile.in 2010-07-16 14:34:08.453125000 +0200
+@@ -13,5 +13,5 @@ rarpd: rarpd.o @LIBOBJS@
+ $(CC) @LDFLAGS@ -o $@ rarpd.o @LIBOBJS@ @LIBS@
+
+ install: rarpd
+- $(ENSUREDIR) $(DESTDIR)$(SBINDIR) 755
++ @mkdir -p $(DESTDIR)$(SBINDIR)
+ $(INSTALL) -c -m 0755 rarpd $(DESTDIR)$(SBINDIR)
diff --git a/tools/cpio/src/cpio.c b/tools/cpio/src/cpio.c
index 00f4a16b7..d91f25dc1 100644
--- a/tools/cpio/src/cpio.c
+++ b/tools/cpio/src/cpio.c
@@ -81,7 +81,8 @@ int sysv3;
#if defined (__linux__) || defined (__sun) || defined (__FreeBSD__) || \
defined (__hpux) || defined (_AIX) || defined (__NetBSD__) || \
- defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__)
+ defined (__OpenBSD__) || defined (__DragonFly__) || \
+ defined (__APPLE__) || defined (__CYGWIN__)
#include <sys/mtio.h>
#else /* SVR4.2MP */
#include <sys/scsi.h>
@@ -4495,7 +4496,8 @@ tseek(off_t n)
int i = (n - poffs) / tapeblock;
#if defined (__linux__) || defined (__sun) || defined (__FreeBSD__) || \
defined (__hpux) || defined (_AIX) || defined (__NetBSD__) || \
- defined (__OpenBSD__) || defined (__DragonFly__) || defined (__APPLE__)
+ defined (__OpenBSD__) || defined (__DragonFly__) || \
+ defined (__APPLE__) || defined (__CYGWIN__)
struct mtop mo;
mo.mt_op = i > 0 ? MTFSR : MTBSR;
mo.mt_count = i > 0 ? i : -i;
@@ -4735,7 +4737,7 @@ mstat(void)
emsg(3, "Error during stat() of archive");
done(1);
}
-#if defined (__linux__)
+#if defined (__linux__)
if ((mtst.st_mode&S_IFMT) == S_IFCHR) {
struct mtget mg;
if (ioctl(mt, MTIOCGET, &mg) == 0)
@@ -4787,6 +4789,13 @@ mstat(void)
if (ioctl(mt, MTIOCGET, &mg) == 0)
tapeblock = mg.mt_blksiz;
}
+#elif defined (__CYGWIN__)
+ if ((mtst.st_mode&S_IFMT) == S_IFCHR) {
+ struct mtget mg;
+ if (ioctl(mt, MTIOCGET, &mg) == 0)
+ tapeblock = (mg.mt_dsreg&MT_ST_BLKSIZE_MASK) >>
+ MT_ST_BLKSIZE_SHIFT;
+ }
#elif defined (__hpux) || defined (_AIX)
#else /* SVR4.2MP */
if ((mtst.st_mode&S_IFMT) == S_IFCHR) {