[PATCH] D30010: Improve the robustness of mmap

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 20 07:39:26 PST 2017


labath added a comment.

Seems to work for me after adding the magic.h include. I can't really guarantee that all bots will be happy with it though..



================
Comment at: llvm/lib/Support/Unix/Path.inc:78
 #include <sys/mount.h>
-#elif defined(__ANDROID__)
+#elif defined(__ANDROID__) || defined(__linux__)
 #include <sys/vfs.h>
----------------
`__ANDROID__` is a subset of `__linux__`. You can drop the former.


================
Comment at: llvm/lib/Support/Unix/Path.inc:350
+  switch ((uint32_t)Vfs.f_type) {
+  case NFS_SUPER_MAGIC:
+  case SMB_SUPER_MAGIC:
----------------
You need to #include <linux/magic.h> to get these constants.


https://reviews.llvm.org/D30010





More information about the llvm-commits mailing list