Skip to content

Commit 58e4eda

Browse files
committed
deps: upgrade c-ares to piscisaureus/cares@805d153
This should fix the Android build.
1 parent 82ff891 commit 58e4eda

File tree

7 files changed

+646
-2
lines changed

7 files changed

+646
-2
lines changed

deps/cares/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/Debug/
2+
/build/gyp
23
/out/
34
/Release/
45

deps/cares/android-configure

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
export TOOLCHAIN=$PWD/android-toolchain
4+
mkdir -p $TOOLCHAIN
5+
$1/build/tools/make-standalone-toolchain.sh \
6+
--toolchain=arm-linux-androideabi-4.7 \
7+
--arch=arm \
8+
--install-dir=$TOOLCHAIN \
9+
--platform=android-9
10+
export PATH=$TOOLCHAIN/bin:$PATH
11+
export AR=arm-linux-androideabi-ar
12+
export CC=arm-linux-androideabi-gcc
13+
export CXX=arm-linux-androideabi-g++
14+
export LINK=arm-linux-androideabi-g++
15+
export PLATFORM=android
16+
export OS=android
17+
18+
if [ $2 -a $2 == 'gyp' ]
19+
then
20+
./gyp_cares -DOS=android -Dtarget_arch=arm
21+
fi

deps/cares/build.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ ifeq (linux,$(OS))
107107
CFLAGS += -D_GNU_SOURCE
108108
endif
109109

110+
ifeq (android,$(OS))
111+
CFLAGS += -D_GNU_SOURCE
112+
endif
113+
110114
ifeq (sunos,$(OS))
111115
LDFLAGS += -lsocket -lnsl
112116
CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500

deps/cares/cares.gyp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,17 @@
121121
# Not Windows i.e. POSIX
122122
'cflags': [
123123
'-g',
124-
'--std=gnu89',
125124
'-pedantic',
126125
'-Wall',
127126
'-Wextra',
128127
'-Wno-unused-parameter'
129128
],
130129
}],
130+
[ 'OS not in "win android"', {
131+
'cflags': [
132+
'--std=gnu89'
133+
],
134+
}],
131135
[ 'OS=="linux"', {
132136
'include_dirs': [ 'config/linux' ],
133137
'sources': [ 'config/linux/ares_config.h' ]
@@ -144,6 +148,10 @@
144148
'include_dirs': [ 'config/openbsd' ],
145149
'sources': [ 'config/openbsd/ares_config.h' ]
146150
}],
151+
[ 'OS=="android"', {
152+
'include_dirs': [ 'config/android' ],
153+
'sources': [ 'config/android/ares_config.h' ],
154+
}],
147155
[ 'OS=="solaris"', {
148156
'include_dirs': [ 'config/sunos' ],
149157
'sources': [ 'config/sunos/ares_config.h' ],

deps/cares/common.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
],
138138
}],
139139

140-
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
140+
[ 'OS in "linux freebsd openbsd solaris android"', {
141141
'variables': {
142142
'gcc_version%': '<!(python build/gcc_version.py)>)'
143143
},

0 commit comments

Comments
 (0)