diff --git a/minix/commands/Makefile b/minix/commands/Makefile index cb9ca97d7..48716f071 100644 --- a/minix/commands/Makefile +++ b/minix/commands/Makefile @@ -7,7 +7,7 @@ SUBDIR= add_route arp at backup btrace \ ci cleantmp co \ compress crc cron crontab \ decomp16 DESCRIBE devmand devsize dhcpd \ - dhrystone diff diskctl \ + dhrystone diskctl \ eject fbdctl \ fix format fsck.mfs \ gcov-pull host \ diff --git a/minix/usr.bin/Makefile b/minix/usr.bin/Makefile index 4a115a3f8..2ca8843be 100644 --- a/minix/usr.bin/Makefile +++ b/minix/usr.bin/Makefile @@ -4,6 +4,7 @@ SUBDIR+= eepromread .endif # ${MACHINE_ARCH} == "earm" +SUBDIR+= diff SUBDIR+= grep SUBDIR+= mined SUBDIR+= ministat diff --git a/minix/commands/diff/Makefile b/minix/usr.bin/diff/Makefile similarity index 100% rename from minix/commands/diff/Makefile rename to minix/usr.bin/diff/Makefile diff --git a/minix/commands/diff/diff.1 b/minix/usr.bin/diff/diff.1 similarity index 100% rename from minix/commands/diff/diff.1 rename to minix/usr.bin/diff/diff.1 diff --git a/minix/commands/diff/diff.c b/minix/usr.bin/diff/diff.c similarity index 100% rename from minix/commands/diff/diff.c rename to minix/usr.bin/diff/diff.c diff --git a/minix/commands/diff/diff.h b/minix/usr.bin/diff/diff.h similarity index 100% rename from minix/commands/diff/diff.h rename to minix/usr.bin/diff/diff.h diff --git a/minix/commands/diff/diffdir.c b/minix/usr.bin/diff/diffdir.c similarity index 98% rename from minix/commands/diff/diffdir.c rename to minix/usr.bin/diff/diffdir.c index 2d6f091be..cc4fb992c 100644 --- a/minix/commands/diff/diffdir.c +++ b/minix/usr.bin/diff/diffdir.c @@ -176,7 +176,11 @@ getdiffdirentries(int fd, char *buf, int nbytes) if(!(read_de = malloc(readlen))) errx(1, "getdiffdirentries: can't malloc"); +#ifndef __minix dentsbytes_actual = getdents(fd, (struct dirent *) read_de, readlen); +#else /* __minix */ + dentsbytes_actual = getdents(fd, read_de, readlen); +#endif /* __minix */ if(dentsbytes_actual <= 0) return dentsbytes_actual; diff --git a/minix/commands/diff/diffreg.c b/minix/usr.bin/diff/diffreg.c similarity index 100% rename from minix/commands/diff/diffreg.c rename to minix/usr.bin/diff/diffreg.c diff --git a/minix/commands/diff/pathnames.h b/minix/usr.bin/diff/pathnames.h similarity index 100% rename from minix/commands/diff/pathnames.h rename to minix/usr.bin/diff/pathnames.h diff --git a/minix/commands/diff/xmalloc.c b/minix/usr.bin/diff/xmalloc.c similarity index 100% rename from minix/commands/diff/xmalloc.c rename to minix/usr.bin/diff/xmalloc.c diff --git a/minix/commands/diff/xmalloc.h b/minix/usr.bin/diff/xmalloc.h similarity index 100% rename from minix/commands/diff/xmalloc.h rename to minix/usr.bin/diff/xmalloc.h