diff --git a/dist/pdisk/dump.c b/dist/pdisk/dump.c index 6d1a9f5e4363..10a19917ed57 100644 --- a/dist/pdisk/dump.c +++ b/dist/pdisk/dump.c @@ -272,7 +272,7 @@ dump_partition_entry(partition_map *entry, int type_length, int name_length, int int driver; // int kind; char *buf; -#if 0 || defined(__NetBSD__) +#if 1 BZB *bp; #endif @@ -337,7 +337,7 @@ dump_partition_entry(partition_map *entry, int type_length, int name_length, int printf(" (%#5.1f%c)", bytes, j); } -#if 0 || defined(__NetBSD__) +#if 1 // Old A/UX fields that no one pays attention to anymore. bp = (BZB *) (p->dpme_bzb); j = -1; diff --git a/dist/pdisk/file_media.c b/dist/pdisk/file_media.c index f73b31982196..82892cca335c 100644 --- a/dist/pdisk/file_media.c +++ b/dist/pdisk/file_media.c @@ -60,7 +60,7 @@ #ifdef __linux__ #define LOFF_MAX 9223372036854775807LL extern __loff_t llseek __P ((int __fd, __loff_t __offset, int __whence)); -#elif defined(__NetBSD__) +#elif defined(__NetBSD__) || defined(__APPLE__) #define loff_t off_t #define llseek lseek #define LOFF_MAX LLONG_MAX diff --git a/dist/pdisk/makefile b/dist/pdisk/makefile index 1e6de5c6eb10..179aeda19a55 100644 --- a/dist/pdisk/makefile +++ b/dist/pdisk/makefile @@ -129,7 +129,7 @@ MAC_68KBINARY= \ pdisk_68k.hqx -CFLAGS = -Wall +CFLAGS = -Wall -D__unix__ DIST_TAR_FLAGS = cvf diff --git a/dist/pdisk/pdisk.c b/dist/pdisk/pdisk.c index 26178321b00f..d35344bb9ab7 100644 --- a/dist/pdisk/pdisk.c +++ b/dist/pdisk/pdisk.c @@ -30,7 +30,7 @@ // for printf() #include -#if defined(__linux__) || defined(__NetBSD__) +#if defined(__linux__) #include #endif #ifdef __linux__ @@ -44,6 +44,10 @@ #endif #endif +#ifdef __unix__ +#include +#endif + // for strncpy() & strlen() #include // for O_RDONLY