]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: pylibmount, mount context is Linux only
authorRuediger Meier <rudi@localhost>
Mon, 21 Mar 2016 13:04:42 +0000 (14:04 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 21 Mar 2016 20:03:41 +0000 (21:03 +0100)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
libmount/python/Makemodule.am
libmount/python/pylibmount.c
libmount/python/pylibmount.h

index 367d324729f4d0ca6c82d7a18ca7829fe852f954..9964e31299caedf38fb6d811eafc854243bb1521 100644 (file)
@@ -12,8 +12,10 @@ pylibmount_la_SOURCES = \
        libmount/python/pylibmount.c \
        libmount/python/pylibmount.h \
        libmount/python/fs.c \
-       libmount/python/tab.c \
-       libmount/python/context.c
+       libmount/python/tab.c
+if LINUX
+pylibmount_la_SOURCES += libmount/python/context.c
+endif
 
 pylibmount_la_LIBADD = libmount.la $(PYTHON_LIBS)
 
index c538bb5436db7c8c5087748dd5af87f8ada7a09d..54d7dfa70cf00452c982e1ae4ebab9b83bbd3b81 100644 (file)
@@ -229,7 +229,9 @@ PyMODINIT_FUNC initpylibmount(void)
 
        FS_AddModuleObject(m);
        Table_AddModuleObject(m);
+#ifdef __linux__
        Context_AddModuleObject(m);
+#endif
 
        /*
         * mount(8) userspace options masks (MNT_MAP_USERSPACE map)
index 1a08796dc0d5e82edb8745d7640d315e5a9398eb..7a37014f1c95f5f9621407d99238fe8b621b8654 100644 (file)
@@ -94,6 +94,8 @@ extern void Table_AddModuleObject(PyObject *mod);
 
 extern int pymnt_table_parser_errcb(struct libmnt_table *tb, const char *filename, int line);
 
+#ifdef __linux__
+
 /*
  * context.c
  */
@@ -108,6 +110,8 @@ typedef struct {
 extern PyTypeObject ContextType;
 extern void Context_AddModuleObject(PyObject *mod);
 
+#endif /* __linux__ */
+
 /*
  * misc
  */