Skip to content

Commit

Permalink
sys/mnttab.h: include sys/stat.h for stat64
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Hiếu Lê <[email protected]>
Closes #10195
  • Loading branch information
alaviss authored Apr 14, 2020
1 parent 9f0a21e commit 6b1139e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/libspl/include/os/linux/sys/mnttab.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

#include <stdio.h>
#include <mntent.h>
#include <sys/stat.h>
#include <sys/types.h>

#ifdef MNTTAB
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 6b1139e

Please sign in to comment.