compat: export symbol elfcorehdr_addr if it is not exported by the kernel
[~tnikolova/compat/.git] / compat / compat-3.18.c
index 4dced45..824ba4c 100644 (file)
@@ -1,5 +1,12 @@
 #include <linux/kernel.h>
+#include <linux/export.h>
 #include <linux/crash_dump.h>
 
+#ifndef HAVE_ELFCOREHDR_ADDR_EXPORTED
+#ifndef ELFCORE_ADDR_MAX
+#define ELFCORE_ADDR_MAX        (-1ULL)
+#endif
+
 unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX;
 EXPORT_SYMBOL_GPL(elfcorehdr_addr);
+#endif /* HAVE_ELFCOREHDR_ADDR_EXPORTED */