]> err.no Git - util-linux/commitdiff
libblkid: conditionalise parts from blkid/topology for Linux
authorFabian Groffen <grobian@gentoo.org>
Tue, 25 Jan 2011 21:48:15 +0000 (22:48 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 31 Jan 2011 16:53:25 +0000 (17:53 +0100)
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/blkid/src/topology/Makefile.am
shlibs/blkid/src/topology/topology.c
shlibs/blkid/src/topology/topology.h

index 11c348b6b1685eebc0e5b8b4e6dce52c5c937ec0..775fea3e0d9db95d9143582cbaa8c715cd1c2c52 100644 (file)
@@ -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
index f39f49fbc436f75d5d540eb8782f4b8730767720..27dc755fd28c56dee6e2646d6b21f7b5c1e582a5 100644 (file)
@@ -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
 };
 
 
index b7429d904c5a5d8de778f428cc085e781155edb9..6d2f433450df84c583a674942d4f7a3218b32a23 100644 (file)
@@ -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 */