diff options
-rw-r--r-- | cmd/zinject/translate.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/zinject/translate.c b/cmd/zinject/translate.c index fc1612738..b2ccb673a 100644 --- a/cmd/zinject/translate.c +++ b/cmd/zinject/translate.c @@ -115,7 +115,11 @@ parse_pathname(const char *inpath, char *dataset, char *relpath, return (-1); } +#ifdef HAVE_SETMNTENT + if ((fp = setmntent(MNTTAB, "r")) == NULL) { +#else if ((fp = fopen(MNTTAB, "r")) == NULL) { +#endif (void) fprintf(stderr, "cannot open /etc/mtab\n"); return (-1); } |