summaryrefslogtreecommitdiff
path: root/deps/cares
diff options
context:
space:
mode:
authorGireesh Punathil <gpunathi@in.ibm.com>2016-04-20 11:23:19 -0400
committerMichael Dawson <michael_dawson@ca.ibm.com>2016-04-21 19:20:37 -0400
commit40ede46690b34ab9a7f0cb5d0adafb2c45b7c87a (patch)
tree70b22583ecdc09f7c6bc8dbdeec7fdac16940811 /deps/cares
parent1fa8fce2108bd8e63fe52a235b6fe6ac4dd9e0b8 (diff)
downloadandroid-node-v8-40ede46690b34ab9a7f0cb5d0adafb2c45b7c87a.tar.gz
android-node-v8-40ede46690b34ab9a7f0cb5d0adafb2c45b7c87a.tar.bz2
android-node-v8-40ede46690b34ab9a7f0cb5d0adafb2c45b7c87a.zip
cares: Support malloc(0) scenarios for AIX
Many places in cares library, when the stream data arrives from the network with respect to dns and reverse dns resolution, they are populated into data structures created dymaically based on the size of the data. Malloc is heavily used for such cases. Often, based on the data length, malloc(0) is invoked. Linux behavior on zero byte allocation is to return a valid pointer where in AIX, it always return NULL. This manifestst as test failure of test/internet/test-dns.js Solution is to build cares with Linux compatible malloc behavior PR-URL: https://github.com/nodejs/node/pull/6305 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-by: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'deps/cares')
-rw-r--r--deps/cares/cares.gyp4
1 files changed, 4 insertions, 0 deletions
diff --git a/deps/cares/cares.gyp b/deps/cares/cares.gyp
index 8a5239b412..745e38e33d 100644
--- a/deps/cares/cares.gyp
+++ b/deps/cares/cares.gyp
@@ -12,6 +12,10 @@
[ 'OS=="aix"', {
'include_dirs': [ 'config/aix' ],
'sources': [ 'config/aix/ares_config.h' ],
+ 'defines': [
+ # Support for malloc(0)
+ '_LINUX_SOURCE_COMPAT=1',
+ '_ALL_SOURCE=1'],
}],
['OS=="solaris"', {
'defines': [