From e624bc558b9148b004c7908f12fad35038e3f5af Mon Sep 17 00:00:00 2001 From: Andreas Henriksson Date: Fri, 19 Sep 2014 01:36:33 +0200 Subject: libmount: only invoke loopcxt on linux This is part of an attempt to make libmount buildable on non-linux. The support for /dev/loop* is Linux-specific so just disable it on non-linux for now. Signed-off-by: Andreas Henriksson --- libmount/src/cache.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libmount/src/cache.c') diff --git a/libmount/src/cache.c b/libmount/src/cache.c index 8b2e6560f..fcd84fde7 100644 --- a/libmount/src/cache.c +++ b/libmount/src/cache.c @@ -633,6 +633,7 @@ char *mnt_pretty_path(const char *path, struct libmnt_cache *cache) if (!pretty) return strdup("none"); +#ifdef __linux__ /* users assume backing file name rather than /dev/loopN in * output if the device has been initialized by mount(8). */ @@ -653,6 +654,7 @@ char *mnt_pretty_path(const char *path, struct libmnt_cache *cache) loopcxt_deinit(&lc); } +#endif done: /* don't return pointer to the cache, allocate a new string */ -- cgit v1.2.3-55-g7522