Move OpenBSD diff(1) into minix/usr.bin

Editor's note: NetBSD uses GNU diff.

Change-Id: I15d4441c73e0c626d0e5fda8c8683d131fbcbc38
This commit is contained in:
David van Moolenbroek 2015-09-19 23:21:24 +00:00
parent 040ec64444
commit d8634bad6a
11 changed files with 6 additions and 1 deletions

View file

@ -7,7 +7,7 @@ SUBDIR= add_route arp at backup btrace \
ci cleantmp co \ ci cleantmp co \
compress crc cron crontab \ compress crc cron crontab \
decomp16 DESCRIBE devmand devsize dhcpd \ decomp16 DESCRIBE devmand devsize dhcpd \
dhrystone diff diskctl \ dhrystone diskctl \
eject fbdctl \ eject fbdctl \
fix format fsck.mfs \ fix format fsck.mfs \
gcov-pull host \ gcov-pull host \

View file

@ -4,6 +4,7 @@
SUBDIR+= eepromread SUBDIR+= eepromread
.endif # ${MACHINE_ARCH} == "earm" .endif # ${MACHINE_ARCH} == "earm"
SUBDIR+= diff
SUBDIR+= grep SUBDIR+= grep
SUBDIR+= mined SUBDIR+= mined
SUBDIR+= ministat SUBDIR+= ministat

View file

@ -176,7 +176,11 @@ getdiffdirentries(int fd, char *buf, int nbytes)
if(!(read_de = malloc(readlen))) if(!(read_de = malloc(readlen)))
errx(1, "getdiffdirentries: can't malloc"); errx(1, "getdiffdirentries: can't malloc");
#ifndef __minix
dentsbytes_actual = getdents(fd, (struct dirent *) read_de, readlen); dentsbytes_actual = getdents(fd, (struct dirent *) read_de, readlen);
#else /* __minix */
dentsbytes_actual = getdents(fd, read_de, readlen);
#endif /* __minix */
if(dentsbytes_actual <= 0) if(dentsbytes_actual <= 0)
return dentsbytes_actual; return dentsbytes_actual;