fix nits to compile and function on osX

This commit is contained in:
dbj 2003-04-24 03:38:53 +00:00
parent 47e126059c
commit 729bd4d1af
4 changed files with 9 additions and 5 deletions

4
dist/pdisk/dump.c vendored
View File

@ -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;

View File

@ -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

2
dist/pdisk/makefile vendored
View File

@ -129,7 +129,7 @@ MAC_68KBINARY= \
pdisk_68k.hqx
CFLAGS = -Wall
CFLAGS = -Wall -D__unix__
DIST_TAR_FLAGS = cvf

6
dist/pdisk/pdisk.c vendored
View File

@ -30,7 +30,7 @@
// for printf()
#include <stdio.h>
#if defined(__linux__) || defined(__NetBSD__)
#if defined(__linux__)
#include <getopt.h>
#endif
#ifdef __linux__
@ -44,6 +44,10 @@
#endif
#endif
#ifdef __unix__
#include <unistd.h>
#endif
// for strncpy() & strlen()
#include <string.h>
// for O_RDONLY