[PATCH] D30261: [Support] Provide linux/magic.h fallback for older kernels

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 3 02:16:23 PDT 2018


labath added inline comments.


================
Comment at: llvm/trunk/lib/Support/Unix/Path.inc:79
 #elif defined(__linux__)
+#if defined(HAVE_LINUX_MAGIC_H)
 #include <linux/magic.h>
----------------
thakis wrote:
> The three HAVE_LINUX_ referenced here aren't listed in include/llvm/Config/config.h.cmake, so they never make it across from the cmake world to the C world -- they're never defined here. Since this also adds fallback code defining _SUPER_MAGIC things still work, but the cmake checks above are effectively dead code. Since we already have the fallbacks, maybe we should just delete the cmake checks instead of adding yet more stuff to config.h.cmake?
sounds good to me. It's not like those numbers are ever going to change.


Repository:
  rL LLVM

https://reviews.llvm.org/D30261





More information about the llvm-commits mailing list