Bug 1110529 - Fix unwrapped function call. r=glandium, a=sledru
authorEugen Sawin <esawin@mozilla.com>
Tue, 16 Dec 2014 14:06:56 +0100
changeset 242551 314f2b8b572b78625d75118ba429c752bd7618a2
parent 242550 856412935fe269d30f5fc846bc3f69f444679785
child 242552 f619d7d3af3e14d6a99d86795e85b500982b6b9f
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium, sledru
bugs1110529
milestone36.0a2
Bug 1110529 - Fix unwrapped function call. r=glandium, a=sledru
other-licenses/android/getaddrinfo.c
--- a/other-licenses/android/getaddrinfo.c
+++ b/other-licenses/android/getaddrinfo.c
@@ -409,16 +409,24 @@ do { 								\
 extern const char *
 __wrap_gai_strerror(int ecode);
 extern void
 __wrap_freeaddrinfo(struct addrinfo *ai);
 extern int
 __wrap_getaddrinfo(const char *hostname, const char *servname,
     const struct addrinfo *hints, struct addrinfo **res);
 
+extern const char *
+__real_gai_strerror(int ecode);
+extern void
+__real_freeaddrinfo(struct addrinfo *ai);
+extern int
+__real_getaddrinfo(const char *hostname, const char *servname,
+    const struct addrinfo *hints, struct addrinfo **res);
+
 int android_sdk_version;
 
 #pragma GCC visibility pop
 
 int android_sdk_version = -1;
 
 static int honeycomb_or_later()
 {
@@ -429,29 +437,29 @@ static int honeycomb_or_later()
 #endif
 	return android_sdk_version >= 11;
 }
 
 const char *
 __wrap_gai_strerror(int ecode)
 {
 	if (honeycomb_or_later())
-		return gai_strerror(ecode);
+		return __real_gai_strerror(ecode);
 	if (ecode < 0 || ecode > EAI_MAX)
 		ecode = EAI_MAX;
 	return ai_errlist[ecode];
 }
 
 void
 __wrap_freeaddrinfo(struct addrinfo *ai)
 {
 	struct addrinfo *next;
 
 	if (honeycomb_or_later()) {
-		freeaddrinfo(ai);
+		__real_freeaddrinfo(ai);
 		return;
 	}
 
 	assert(ai != NULL);
 
 	do {
 		next = ai->ai_next;
 		if (ai->ai_canonname)
@@ -540,17 +548,17 @@ int
 	struct addrinfo *cur;
 	int error = 0;
 	struct addrinfo ai;
 	struct addrinfo ai0;
 	struct addrinfo *pai;
 	const struct explore *ex;
 
 	if (honeycomb_or_later())
-		return getaddrinfo(hostname, servname, hints, res);
+		return __real_getaddrinfo(hostname, servname, hints, res);
 
 	/* hostname is allowed to be NULL */
 	/* servname is allowed to be NULL */
 	/* hints is allowed to be NULL */
 	assert(res != NULL);
 
 	memset(&sentinel, 0, sizeof(sentinel));
 	cur = &sentinel;