summaryrefslogtreecommitdiffstats
path: root/third_party/talloc
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-27 01:04:16 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-27 01:04:16 +0000
commitbc78d796c96115fe1b611bd417d218c5560f4f81 (patch)
treeed21be20f8850b007c6659a0ac68ae604977149d /third_party/talloc
parent26121ca4d4ce38f87e7276550f919a756db12abb (diff)
downloadchromium_src-bc78d796c96115fe1b611bd417d218c5560f4f81.zip
chromium_src-bc78d796c96115fe1b611bd417d218c5560f4f81.tar.gz
chromium_src-bc78d796c96115fe1b611bd417d218c5560f4f81.tar.bz2
Change talloc.c to build with the mac 10.7 SDK
talloc.c has a local diff to define strnlen(), instead of using the definition in replace.c. However, the 10.7 SDK has its own strnlen(), which makes the compiler complain about a strnlen() redefinition. Use the pattern from replace.c to fix the redefinition problem. With this change, 'browser_tests' builds with the 10.7 SDK. BUG=136844 TEST=none Review URL: https://chromiumcodereview.appspot.com/10832045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148685 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/talloc')
-rw-r--r--third_party/talloc/chromium.patch3
-rw-r--r--third_party/talloc/talloc.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/third_party/talloc/chromium.patch b/third_party/talloc/chromium.patch
index 26d4463..d935451 100644
--- a/third_party/talloc/chromium.patch
+++ b/third_party/talloc/chromium.patch
@@ -254,7 +254,8 @@ diff -c -r talloc-2.0.1/talloc.c talloc/talloc.c
}
+ #ifndef HAVE_STRNLEN
-+ static size_t strnlen(const char* s, size_t n)
++ #define strnlen rep_strnlen
++ static size_t rep_strnlen(const char* s, size_t n)
+ {
+ if (unlikely(!s)) return 0;
+ int i = 0;
diff --git a/third_party/talloc/talloc.c b/third_party/talloc/talloc.c
index ecf625a..4bcd65d 100644
--- a/third_party/talloc/talloc.c
+++ b/third_party/talloc/talloc.c
@@ -1594,7 +1594,8 @@ char *talloc_strdup(const void *t, const char *p)
}
#ifndef HAVE_STRNLEN
-static size_t strnlen(const char* s, size_t n)
+#define strnlen rep_strnlen
+static size_t rep_strnlen(const char* s, size_t n)
{
if (unlikely(!s)) return 0;
int i = 0;