sys/mnttab.h: include sys/stat.h for stat64

Musl libc defined `stat64` as a macro, which causes the build to fail
upon compiling os/linux/getmntany.c due to conflicts between the forward
declaration and the implementation.

This commit fixes that by including <sys/stat.h> in "sys/mnttab.h"
directly.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Hiếu Lê <leorize+oss@disroot.org>
Closes #10195
This commit is contained in:
alaviss 2020-04-14 18:47:40 +00:00 committed by GitHub
parent 9f0a21e641
commit 6b1139e82c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -32,6 +32,7 @@
#include <stdio.h>
#include <mntent.h>
#include <sys/stat.h>
#include <sys/types.h>
#ifdef MNTTAB
@ -67,7 +68,6 @@ struct extmnttab {
uint_t mnt_minor;
};
struct stat64;
struct statfs;
extern int getmntany(FILE *fp, struct mnttab *mp, struct mnttab *mpref);