Only build ioctl, md, and evms on Linux hosts, where they make sense. ioctl also fails to build on non-Linux due to missing constants. Signed-off-by: Fabian Groffen <grobian@xxxxxxxxxx> diff --git a/shlibs/blkid/src/topology/Makefile.am b/shlibs/blkid/src/topology/Makefile.am --- a/shlibs/blkid/src/topology/Makefile.am +++ b/shlibs/blkid/src/topology/Makefile.am @@ -6,9 +6,13 @@ noinst_LTLIBRARIES = libblkid_topology.la libblkid_topology_la_SOURCES = topology.c \ topology.h \ + sysfs.c \ + dm.c \ + lvm.c + +if LINUX +libblkid_topology_la_SOURCES += \ ioctl.c \ - sysfs.c \ md.c \ - dm.c \ - evms.c \ - lvm.c + evms.c +endif diff --git a/shlibs/blkid/src/topology/topology.c b/shlibs/blkid/src/topology/topology.c --- a/shlibs/blkid/src/topology/topology.c +++ b/shlibs/blkid/src/topology/topology.c @@ -74,12 +74,19 @@ */ static const struct blkid_idinfo *idinfos[] = { +#ifdef __linux__ &ioctl_tp_idinfo, +#endif &sysfs_tp_idinfo, +#ifdef __linux__ &md_tp_idinfo, +#endif &dm_tp_idinfo, - &lvm_tp_idinfo, + &lvm_tp_idinfo +#ifdef __linux__ + , &evms_tp_idinfo +#endif }; diff --git a/shlibs/blkid/src/topology/topology.h b/shlibs/blkid/src/topology/topology.h --- a/shlibs/blkid/src/topology/topology.h +++ b/shlibs/blkid/src/topology/topology.h @@ -11,11 +11,13 @@ /* * topology probers */ +#ifdef __linux__ extern const struct blkid_idinfo ioctl_tp_idinfo; +extern const struct blkid_idinfo md_tp_idinfo; +extern const struct blkid_idinfo evms_tp_idinfo; +#endif extern const struct blkid_idinfo sysfs_tp_idinfo; -extern const struct blkid_idinfo md_tp_idinfo; extern const struct blkid_idinfo dm_tp_idinfo; -extern const struct blkid_idinfo evms_tp_idinfo; extern const struct blkid_idinfo lvm_tp_idinfo; #endif /* BLKID_TOPOLOGY_H */ -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html