From 9f55bf3794ca98852dd1f352f993dea60d83a2e1 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Tue, 25 Jan 2011 22:48:15 +0100 Subject: libblkid: conditionalise parts from blkid/topology for Linux Signed-off-by: Fabian Groffen Signed-off-by: Karel Zak --- shlibs/blkid/src/topology/Makefile.am | 13 ++++++++----- shlibs/blkid/src/topology/topology.c | 2 ++ shlibs/blkid/src/topology/topology.h | 6 ++++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/shlibs/blkid/src/topology/Makefile.am b/shlibs/blkid/src/topology/Makefile.am index 11c348b6..775fea3e 100644 --- a/shlibs/blkid/src/topology/Makefile.am +++ b/shlibs/blkid/src/topology/Makefile.am @@ -5,10 +5,13 @@ libblkid_topology_la_LIBADD = noinst_LTLIBRARIES = libblkid_topology.la libblkid_topology_la_SOURCES = topology.c \ - topology.h \ + topology.h + +if LINUX +libblkid_topology_la_SOURCES += sysfs.c \ + dm.c \ + lvm.c \ 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 index f39f49fb..27dc755f 100644 --- a/shlibs/blkid/src/topology/topology.c +++ b/shlibs/blkid/src/topology/topology.c @@ -74,12 +74,14 @@ struct blkid_struct_topology { */ static const struct blkid_idinfo *idinfos[] = { +#ifdef __linux__ &ioctl_tp_idinfo, &sysfs_tp_idinfo, &md_tp_idinfo, &dm_tp_idinfo, &lvm_tp_idinfo, &evms_tp_idinfo +#endif }; diff --git a/shlibs/blkid/src/topology/topology.h b/shlibs/blkid/src/topology/topology.h index b7429d90..6d2f4334 100644 --- a/shlibs/blkid/src/topology/topology.h +++ b/shlibs/blkid/src/topology/topology.h @@ -11,12 +11,14 @@ extern int blkid_topology_set_physical_sector_size(blkid_probe pr, unsigned long /* * topology probers */ +#ifdef __linux__ extern const struct blkid_idinfo ioctl_tp_idinfo; -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 sysfs_tp_idinfo; +extern const struct blkid_idinfo dm_tp_idinfo; extern const struct blkid_idinfo lvm_tp_idinfo; +#endif #endif /* BLKID_TOPOLOGY_H */ -- cgit v1.2.3