diff options
author | Richard Yao <[email protected]> | 2017-04-08 12:51:04 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-04-12 08:58:09 -0700 |
commit | 120ff39a75ad52efc359308a5e128a58998dd2f3 (patch) | |
tree | 1af0e21a6939a6e5d4d97ce0f342036b7072f854 /lib/libzfs/libzfs_util.c | |
parent | 281f1fa30ac3558d0e5e1573bdb9113291815bcd (diff) |
Fix header inclusions for standards conformance
musl's sys/errno.h is literally:
/#warning redirecting incorrect #include <sys/errno.h> to <errno.h>
/#include <errno.h>
It does the same for sys/{poll,signal}.h. This is rather noisy when
building ZoL against musl. musl is also correct in pointing out that the
correct headers are outside of sys/ according to the single unix
specification:
http://pubs.opengroup.org/onlinepubs/7908799/xsh/errno.h.html
http://pubs.opengroup.org/onlinepubs/7908799/xsh/poll.h.html
http://pubs.opengroup.org/onlinepubs/7908799/xsh/signal.h.html
Lets implement our own sys/* versions of these headers to redirect to
the proper userland ones when building in userspace. That will silence
the warning.
There are also some instances where we include incorrectly from sys/ or
from outside of sys/ in userspace only code. In these instances, lets
just fix the includes directly.
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: loli10K <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Signed-off-by: Richard Yao <[email protected]>
Closes #5993
Diffstat (limited to 'lib/libzfs/libzfs_util.c')
-rw-r--r-- | lib/libzfs/libzfs_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c index 4e8332608..e9119e11d 100644 --- a/lib/libzfs/libzfs_util.c +++ b/lib/libzfs/libzfs_util.c @@ -44,7 +44,7 @@ #include <sys/mnttab.h> #include <sys/mntent.h> #include <sys/types.h> -#include <wait.h> +#include <sys/wait.h> #include <libzfs.h> #include <libzfs_core.h> |