From: Ruediger Meier <rudi@localhost> Signed-off-by: Ruediger Meier <ruediger.meier@xxxxxxxxxxx> --- libmount/python/Makemodule.am | 6 ++++-- libmount/python/pylibmount.c | 2 ++ libmount/python/pylibmount.h | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libmount/python/Makemodule.am b/libmount/python/Makemodule.am index 367d324..9964e31 100644 --- a/libmount/python/Makemodule.am +++ b/libmount/python/Makemodule.am @@ -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) diff --git a/libmount/python/pylibmount.c b/libmount/python/pylibmount.c index c538bb5..54d7dfa 100644 --- a/libmount/python/pylibmount.c +++ b/libmount/python/pylibmount.c @@ -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) diff --git a/libmount/python/pylibmount.h b/libmount/python/pylibmount.h index 1a08796..7a37014 100644 --- a/libmount/python/pylibmount.h +++ b/libmount/python/pylibmount.h @@ -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 */ -- 1.8.4.5 -- 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