mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
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
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user