mirror_zfs/lib/libspl/include/sys/Makefile.am
Richard Yao 120ff39a75 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 <mail@gmelikov.ru>
Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Richard Yao <ryao@gentoo.org>
Closes #5993
2017-04-12 08:58:09 -07:00

56 lines
2.5 KiB
Makefile

SUBDIRS = dktp
libspldir = $(includedir)/libspl/sys
libspl_HEADERS = \
$(top_srcdir)/lib/libspl/include/sys/acl.h \
$(top_srcdir)/lib/libspl/include/sys/acl_impl.h \
$(top_srcdir)/lib/libspl/include/sys/bitmap.h \
$(top_srcdir)/lib/libspl/include/sys/byteorder.h \
$(top_srcdir)/lib/libspl/include/sys/callb.h \
$(top_srcdir)/lib/libspl/include/sys/cmn_err.h \
$(top_srcdir)/lib/libspl/include/sys/compress.h \
$(top_srcdir)/lib/libspl/include/sys/cred.h \
$(top_srcdir)/lib/libspl/include/sys/debug.h \
$(top_srcdir)/lib/libspl/include/sys/dkio.h \
$(top_srcdir)/lib/libspl/include/sys/dklabel.h \
$(top_srcdir)/lib/libspl/include/sys/errno.h \
$(top_srcdir)/lib/libspl/include/sys/feature_tests.h \
$(top_srcdir)/lib/libspl/include/sys/file.h \
$(top_srcdir)/lib/libspl/include/sys/frame.h \
$(top_srcdir)/lib/libspl/include/sys/int_limits.h \
$(top_srcdir)/lib/libspl/include/sys/int_types.h \
$(top_srcdir)/lib/libspl/include/sys/inttypes.h \
$(top_srcdir)/lib/libspl/include/sys/isa_defs.h \
$(top_srcdir)/lib/libspl/include/sys/kmem.h \
$(top_srcdir)/lib/libspl/include/sys/kstat.h \
$(top_srcdir)/lib/libspl/include/sys/list.h \
$(top_srcdir)/lib/libspl/include/sys/list_impl.h \
$(top_srcdir)/lib/libspl/include/sys/mhd.h \
$(top_srcdir)/lib/libspl/include/sys/mkdev.h \
$(top_srcdir)/lib/libspl/include/sys/mnttab.h \
$(top_srcdir)/lib/libspl/include/sys/mount.h \
$(top_srcdir)/lib/libspl/include/sys/note.h \
$(top_srcdir)/lib/libspl/include/sys/param.h \
$(top_srcdir)/lib/libspl/include/sys/policy.h \
$(top_srcdir)/lib/libspl/include/sys/poll.h \
$(top_srcdir)/lib/libspl/include/sys/priv.h \
$(top_srcdir)/lib/libspl/include/sys/processor.h \
$(top_srcdir)/lib/libspl/include/sys/signal.h \
$(top_srcdir)/lib/libspl/include/sys/stack.h \
$(top_srcdir)/lib/libspl/include/sys/stat.h \
$(top_srcdir)/lib/libspl/include/sys/stropts.h \
$(top_srcdir)/lib/libspl/include/sys/sunddi.h \
$(top_srcdir)/lib/libspl/include/sys/sysmacros.h \
$(top_srcdir)/lib/libspl/include/sys/systeminfo.h \
$(top_srcdir)/lib/libspl/include/sys/systm.h \
$(top_srcdir)/lib/libspl/include/sys/time.h \
$(top_srcdir)/lib/libspl/include/sys/types32.h \
$(top_srcdir)/lib/libspl/include/sys/types.h \
$(top_srcdir)/lib/libspl/include/sys/tzfile.h \
$(top_srcdir)/lib/libspl/include/sys/uio.h \
$(top_srcdir)/lib/libspl/include/sys/va_list.h \
$(top_srcdir)/lib/libspl/include/sys/varargs.h \
$(top_srcdir)/lib/libspl/include/sys/vnode.h \
$(top_srcdir)/lib/libspl/include/sys/vtoc.h \
$(top_srcdir)/lib/libspl/include/sys/zone.h