summaryrefslogtreecommitdiff
path: root/elfutils/libdwfl/linux-kernel-modules.c
diff options
context:
space:
mode:
Diffstat (limited to 'elfutils/libdwfl/linux-kernel-modules.c')
-rw-r--r--elfutils/libdwfl/linux-kernel-modules.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/elfutils/libdwfl/linux-kernel-modules.c b/elfutils/libdwfl/linux-kernel-modules.c
index f3d9af10..ae74a497 100644
--- a/elfutils/libdwfl/linux-kernel-modules.c
+++ b/elfutils/libdwfl/linux-kernel-modules.c
@@ -78,6 +78,7 @@
#define MODULE_SECT_NAME_LEN 32 /* Minimum any linux/module.h has had. */
+#if defined (USE_ZLIB) || defined (USE_BZLIB) || defined (USE_LZMA)
static const char *vmlinux_suffixes[] =
{
#ifdef USE_ZLIB
@@ -90,6 +91,7 @@ static const char *vmlinux_suffixes[] =
".xz",
#endif
};
+#endif
/* Try to open the given file as it is or under the debuginfo directory. */
static int
@@ -127,6 +129,7 @@ try_kernel_name (Dwfl *dwfl, char **fname, bool try_debug)
}
}
+#if defined (USE_ZLIB) || defined (USE_BZLIB) || defined (USE_LZMA)
if (fd < 0)
for (size_t i = 0;
i < sizeof vmlinux_suffixes / sizeof vmlinux_suffixes[0];
@@ -145,6 +148,7 @@ try_kernel_name (Dwfl *dwfl, char **fname, bool try_debug)
}
}
}
+#endif
if (fd < 0)
{