diff options
author | наб <nabijaczleweli@nabijaczleweli.xyz> | 2022-03-28 19:24:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-28 10:24:22 -0700 |
commit | bc3f12bfac152a0c28951cec92340ba14f9ccee9 (patch) | |
tree | eb291c1f295ca38dbbc3a70185186e4cdb3b795f /lib | |
parent | b61595ff86fb708aa6e22818f36cea3d346f8241 (diff) |
config: user: check for <aio.h>
And always zpool_read_label_slow() on non-conformant libcs
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Co-authored-by: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13207
Closes #13254
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libzutil/zutil_import.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libzutil/zutil_import.c b/lib/libzutil/zutil_import.c index d7547c424..3744a1c34 100644 --- a/lib/libzutil/zutil_import.c +++ b/lib/libzutil/zutil_import.c @@ -47,7 +47,9 @@ * using our derived config, and record the results. */ +#ifdef HAVE_AIO_H #include <aio.h> +#endif #include <ctype.h> #include <dirent.h> #include <errno.h> @@ -982,6 +984,9 @@ zpool_read_label_slow(int fd, nvlist_t **config, int *num_labels) int zpool_read_label(int fd, nvlist_t **config, int *num_labels) { +#ifndef HAVE_AIO_H + return (zpool_read_label_slow(fd, config, num_labels)); +#else struct stat64 statbuf; struct aiocb aiocbs[VDEV_LABELS]; struct aiocb *aiocbps[VDEV_LABELS]; @@ -1104,6 +1109,7 @@ zpool_read_label(int fd, nvlist_t **config, int *num_labels) *config = expected_config; return (0); +#endif } /* |