media/libvpx/I42ab00e3.patch
author Gregory Szorc <gps@mozilla.com>
Wed, 28 Jan 2015 13:37:00 -0800
branchMOBILE180_2012123109_RELBRANCH
changeset 120289 8033c2e38381d2832d66906e3d03126189c703d5
parent 96755 731c4bc9dd37ac8c1f9794d33cbcfa562affd4e8
permissions -rw-r--r--
Close old release branch MOBILE180_2012123109_RELBRANCH

# HG changeset patch
# Parent 5668c50552abba043eff64ffc5d8abde43d7964a
# User Timothy B. Terriberry <tterribe@vt.edu>
Support Android x86 NDK build

Upstream Change-Id: I42ab00e3255208ba95d7f9b9a8a3605ff58da8e1

diff --git a/media/libvpx/vp8/common/x86/postproc_x86.c b/media/libvpx/vp8/common/x86/postproc_x86.c
new file mode 100644
--- /dev/null
+++ b/media/libvpx/vp8/common/x86/postproc_x86.c
@@ -0,0 +1,21 @@
+/*
+ *  Copyright (c) 2012 The WebM project authors. All Rights Reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+/* On Android NDK, rand is inlined function, but postproc needs rand symbol */
+#if defined(__ANDROID__)
+#define rand __rand
+#include <stdlib.h>
+#undef rand
+
+extern int rand(void)
+{
+  return __rand();
+}
+#endif