[sanitizer] Fix Mac build.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182845 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/lib/sanitizer_common/sanitizer_platform_limits_posix.h
index c5cae88..0c76144 100644
--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h
+++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h
@@ -54,6 +54,22 @@
     uptr iov_len;
   };
 
+#if SANITIZER_ANDROID || SANITIZER_MAC
+  struct __sanitizer_msghdr {
+    void *msg_name;
+    unsigned msg_namelen;
+    struct __sanitizer_iovec *msg_iov;
+    unsigned msg_iovlen;
+    void *msg_control;
+    unsigned msg_controllen;
+    int msg_flags;
+  };
+  struct __sanitizer_cmsghdr {
+    unsigned cmsg_len;
+    int cmsg_level;
+    int cmsg_type;
+  };
+#else
   struct __sanitizer_msghdr {
     void *msg_name;
     unsigned msg_namelen;
@@ -63,12 +79,12 @@
     uptr msg_controllen;
     int msg_flags;
   };
-
   struct __sanitizer_cmsghdr {
     uptr cmsg_len;
     int cmsg_level;
     int cmsg_type;
   };
+#endif
 
   // This thing depends on the platform. We are only interested in the upper
   // limit. Verified with a compiler assert in .cc.