summaryrefslogtreecommitdiffstats
path: root/sandbox/mac/xpc_message_server.cc
diff options
context:
space:
mode:
authorerikchen <erikchen@chromium.org>2015-05-06 13:28:36 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-06 20:29:01 +0000
commit5dc60474a75859e6c3295549f4d2894d1bd81772 (patch)
tree167126e14281ea47a871f796180eb46ce179bbc5 /sandbox/mac/xpc_message_server.cc
parentf9487601c410591159203d1acc9c4f1372534f4b (diff)
downloadchromium_src-5dc60474a75859e6c3295549f4d2894d1bd81772.zip
chromium_src-5dc60474a75859e6c3295549f4d2894d1bd81772.tar.gz
chromium_src-5dc60474a75859e6c3295549f4d2894d1bd81772.tar.bz2
mac: Redeclare xpc calls for compatibility with -Wpartial-availability.
The XPC system calls were first made available in OSX 10.7. To prevent -Wpartial-availability from emitting warnings, the xpc functions that Chrome uses must be redeclared. BUG=471823 Review URL: https://codereview.chromium.org/1105073004 Cr-Commit-Position: refs/heads/master@{#328601}
Diffstat (limited to 'sandbox/mac/xpc_message_server.cc')
-rw-r--r--sandbox/mac/xpc_message_server.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/sandbox/mac/xpc_message_server.cc b/sandbox/mac/xpc_message_server.cc
index 12c8d56..45559dd5 100644
--- a/sandbox/mac/xpc_message_server.cc
+++ b/sandbox/mac/xpc_message_server.cc
@@ -13,6 +13,17 @@
#include "sandbox/mac/dispatch_source_mach.h"
#include "sandbox/mac/xpc.h"
+#if defined(MAC_OS_X_VERSION_10_7) && \
+ MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7
+// Redeclare methods that only exist on 10.7+ to suppress
+// -Wpartial-availability warnings.
+extern "C" {
+XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT XPC_NONNULL_ALL
+ xpc_object_t
+ xpc_dictionary_create_reply(xpc_object_t original);
+} // extern "C"
+#endif
+
namespace sandbox {
XPCMessageServer::XPCMessageServer(MessageDemuxer* demuxer,