-
Notifications
You must be signed in to change notification settings - Fork 634
Use _GNU_SOURCE
macro on Android
#914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Probably be better to just add an |
bradh352
pushed a commit
that referenced
this pull request
Nov 9, 2024
I've got the following error while building c-ares on Android. ``` FAILED: _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o /Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang --target=armv7-none-linux-androideabi33 --sysroot=/Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -DCARES_BUILDING_LIBRARY -DHAVE_CONFIG_H=1 -DCMAKE_INTDIR=\"Debug\" -I/Users/jimmy.park/test-c-ares/build/android-arm/_deps/c-ares-source-build -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6 -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/include -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -Wall -Wextra -Waggregate-return -Wcast-align -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdouble-promotion -Wfloat-equal -Wformat-security -Winit-self -Wmissing-braces -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpedantic -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow -Wstrict-prototypes -Wundef -Wunreachable-code -Wunused -Wvariadic-macros -Wvla -Wwrite-strings -Werror=implicit-int -Werror=implicit-function-declaration -Werror=partial-availability -Qunused-arguments -Wno-long-long -fdiagnostics-color=always -fcolor-diagnostics -fno-limit-debug-info -fno-omit-frame-pointer -O0 -std=c99 -fPIC -fcolor-diagnostics -w -MD -MT _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o -MF _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o.d -o _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o -c /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c:68:7: error: call to undeclared function 'pipe2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 68 | if (pipe2(p->filedes, O_NONBLOCK | O_CLOEXEC) != 0) { | ^ /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c:68:7: note: did you mean 'pipe'? /Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/unistd.h:275:5: note: 'pipe' declared here 275 | int pipe(int __fds[_Nonnull 2]); | ^ 1 error generated. ``` It seems like the `_GNU_SOURCE` macro should be defined because of the [`pipe2` function](https://linux.die.net/man/2/pipe). Authored-By: Jiwoo Park (@jimmy-park)
bradh352
pushed a commit
that referenced
this pull request
Nov 9, 2024
I've got the following error while building c-ares on Android. ``` FAILED: _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o /Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang --target=armv7-none-linux-androideabi33 --sysroot=/Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -DCARES_BUILDING_LIBRARY -DHAVE_CONFIG_H=1 -DCMAKE_INTDIR=\"Debug\" -I/Users/jimmy.park/test-c-ares/build/android-arm/_deps/c-ares-source-build -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6 -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/include -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -Wall -Wextra -Waggregate-return -Wcast-align -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdouble-promotion -Wfloat-equal -Wformat-security -Winit-self -Wmissing-braces -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpedantic -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow -Wstrict-prototypes -Wundef -Wunreachable-code -Wunused -Wvariadic-macros -Wvla -Wwrite-strings -Werror=implicit-int -Werror=implicit-function-declaration -Werror=partial-availability -Qunused-arguments -Wno-long-long -fdiagnostics-color=always -fcolor-diagnostics -fno-limit-debug-info -fno-omit-frame-pointer -O0 -std=c99 -fPIC -fcolor-diagnostics -w -MD -MT _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o -MF _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o.d -o _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o -c /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c:68:7: error: call to undeclared function 'pipe2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 68 | if (pipe2(p->filedes, O_NONBLOCK | O_CLOEXEC) != 0) { | ^ /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c:68:7: note: did you mean 'pipe'? /Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/unistd.h:275:5: note: 'pipe' declared here 275 | int pipe(int __fds[_Nonnull 2]); | ^ 1 error generated. ``` It seems like the `_GNU_SOURCE` macro should be defined because of the [`pipe2` function](https://linux.die.net/man/2/pipe). Authored-By: Jiwoo Park (@jimmy-park)
bradh352
pushed a commit
that referenced
this pull request
Nov 9, 2024
I've got the following error while building c-ares on Android. ``` FAILED: _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o /Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang --target=armv7-none-linux-androideabi33 --sysroot=/Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -DCARES_BUILDING_LIBRARY -DHAVE_CONFIG_H=1 -DCMAKE_INTDIR=\"Debug\" -I/Users/jimmy.park/test-c-ares/build/android-arm/_deps/c-ares-source-build -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6 -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/include -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -Wall -Wextra -Waggregate-return -Wcast-align -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdouble-promotion -Wfloat-equal -Wformat-security -Winit-self -Wmissing-braces -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpedantic -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow -Wstrict-prototypes -Wundef -Wunreachable-code -Wunused -Wvariadic-macros -Wvla -Wwrite-strings -Werror=implicit-int -Werror=implicit-function-declaration -Werror=partial-availability -Qunused-arguments -Wno-long-long -fdiagnostics-color=always -fcolor-diagnostics -fno-limit-debug-info -fno-omit-frame-pointer -O0 -std=c99 -fPIC -fcolor-diagnostics -w -MD -MT _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o -MF _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o.d -o _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o -c /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c:68:7: error: call to undeclared function 'pipe2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 68 | if (pipe2(p->filedes, O_NONBLOCK | O_CLOEXEC) != 0) { | ^ /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c:68:7: note: did you mean 'pipe'? /Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/unistd.h:275:5: note: 'pipe' declared here 275 | int pipe(int __fds[_Nonnull 2]); | ^ 1 error generated. ``` It seems like the `_GNU_SOURCE` macro should be defined because of the [`pipe2` function](https://linux.die.net/man/2/pipe). Authored-By: Jiwoo Park (@jimmy-park)
bradh352
pushed a commit
that referenced
this pull request
Nov 9, 2024
I've got the following error while building c-ares on Android. ``` FAILED: _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o /Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang --target=armv7-none-linux-androideabi33 --sysroot=/Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -DCARES_BUILDING_LIBRARY -DHAVE_CONFIG_H=1 -DCMAKE_INTDIR=\"Debug\" -I/Users/jimmy.park/test-c-ares/build/android-arm/_deps/c-ares-source-build -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6 -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/include -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -Wall -Wextra -Waggregate-return -Wcast-align -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdouble-promotion -Wfloat-equal -Wformat-security -Winit-self -Wmissing-braces -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpedantic -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow -Wstrict-prototypes -Wundef -Wunreachable-code -Wunused -Wvariadic-macros -Wvla -Wwrite-strings -Werror=implicit-int -Werror=implicit-function-declaration -Werror=partial-availability -Qunused-arguments -Wno-long-long -fdiagnostics-color=always -fcolor-diagnostics -fno-limit-debug-info -fno-omit-frame-pointer -O0 -std=c99 -fPIC -fcolor-diagnostics -w -MD -MT _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o -MF _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o.d -o _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o -c /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c:68:7: error: call to undeclared function 'pipe2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 68 | if (pipe2(p->filedes, O_NONBLOCK | O_CLOEXEC) != 0) { | ^ /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c:68:7: note: did you mean 'pipe'? /Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/unistd.h:275:5: note: 'pipe' declared here 275 | int pipe(int __fds[_Nonnull 2]); | ^ 1 error generated. ``` It seems like the `_GNU_SOURCE` macro should be defined because of the [`pipe2` function](https://linux.die.net/man/2/pipe). Authored-By: Jiwoo Park (@jimmy-park)
bradh352
pushed a commit
that referenced
this pull request
Nov 9, 2024
I've got the following error while building c-ares on Android. ``` FAILED: _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o /Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang --target=armv7-none-linux-androideabi33 --sysroot=/Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -DCARES_BUILDING_LIBRARY -DHAVE_CONFIG_H=1 -DCMAKE_INTDIR=\"Debug\" -I/Users/jimmy.park/test-c-ares/build/android-arm/_deps/c-ares-source-build -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6 -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/include -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -Wall -Wextra -Waggregate-return -Wcast-align -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdouble-promotion -Wfloat-equal -Wformat-security -Winit-self -Wmissing-braces -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpedantic -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow -Wstrict-prototypes -Wundef -Wunreachable-code -Wunused -Wvariadic-macros -Wvla -Wwrite-strings -Werror=implicit-int -Werror=implicit-function-declaration -Werror=partial-availability -Qunused-arguments -Wno-long-long -fdiagnostics-color=always -fcolor-diagnostics -fno-limit-debug-info -fno-omit-frame-pointer -O0 -std=c99 -fPIC -fcolor-diagnostics -w -MD -MT _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o -MF _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o.d -o _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o -c /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c:68:7: error: call to undeclared function 'pipe2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 68 | if (pipe2(p->filedes, O_NONBLOCK | O_CLOEXEC) != 0) { | ^ /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c:68:7: note: did you mean 'pipe'? /Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/unistd.h:275:5: note: 'pipe' declared here 275 | int pipe(int __fds[_Nonnull 2]); | ^ 1 error generated. ``` It seems like the `_GNU_SOURCE` macro should be defined because of the [`pipe2` function](https://linux.die.net/man/2/pipe). Authored-By: Jiwoo Park (@jimmy-park)
bradh352
pushed a commit
that referenced
this pull request
Nov 9, 2024
I've got the following error while building c-ares on Android. ``` FAILED: _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o /Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang --target=armv7-none-linux-androideabi33 --sysroot=/Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -DCARES_BUILDING_LIBRARY -DHAVE_CONFIG_H=1 -DCMAKE_INTDIR=\"Debug\" -I/Users/jimmy.park/test-c-ares/build/android-arm/_deps/c-ares-source-build -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6 -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/include -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -Wall -Wextra -Waggregate-return -Wcast-align -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdouble-promotion -Wfloat-equal -Wformat-security -Winit-self -Wmissing-braces -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpedantic -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow -Wstrict-prototypes -Wundef -Wunreachable-code -Wunused -Wvariadic-macros -Wvla -Wwrite-strings -Werror=implicit-int -Werror=implicit-function-declaration -Werror=partial-availability -Qunused-arguments -Wno-long-long -fdiagnostics-color=always -fcolor-diagnostics -fno-limit-debug-info -fno-omit-frame-pointer -O0 -std=c99 -fPIC -fcolor-diagnostics -w -MD -MT _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o -MF _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o.d -o _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o -c /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c:68:7: error: call to undeclared function 'pipe2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 68 | if (pipe2(p->filedes, O_NONBLOCK | O_CLOEXEC) != 0) { | ^ /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c:68:7: note: did you mean 'pipe'? /Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/unistd.h:275:5: note: 'pipe' declared here 275 | int pipe(int __fds[_Nonnull 2]); | ^ 1 error generated. ``` It seems like the `_GNU_SOURCE` macro should be defined because of the [`pipe2` function](https://linux.die.net/man/2/pipe). Authored-By: Jiwoo Park (@jimmy-park)
bradh352
pushed a commit
that referenced
this pull request
Nov 9, 2024
I've got the following error while building c-ares on Android. ``` FAILED: _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o /Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang --target=armv7-none-linux-androideabi33 --sysroot=/Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -DCARES_BUILDING_LIBRARY -DHAVE_CONFIG_H=1 -DCMAKE_INTDIR=\"Debug\" -I/Users/jimmy.park/test-c-ares/build/android-arm/_deps/c-ares-source-build -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6 -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/include -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -Wall -Wextra -Waggregate-return -Wcast-align -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdouble-promotion -Wfloat-equal -Wformat-security -Winit-self -Wmissing-braces -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpedantic -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow -Wstrict-prototypes -Wundef -Wunreachable-code -Wunused -Wvariadic-macros -Wvla -Wwrite-strings -Werror=implicit-int -Werror=implicit-function-declaration -Werror=partial-availability -Qunused-arguments -Wno-long-long -fdiagnostics-color=always -fcolor-diagnostics -fno-limit-debug-info -fno-omit-frame-pointer -O0 -std=c99 -fPIC -fcolor-diagnostics -w -MD -MT _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o -MF _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o.d -o _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o -c /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c:68:7: error: call to undeclared function 'pipe2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 68 | if (pipe2(p->filedes, O_NONBLOCK | O_CLOEXEC) != 0) { | ^ /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c:68:7: note: did you mean 'pipe'? /Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/unistd.h:275:5: note: 'pipe' declared here 275 | int pipe(int __fds[_Nonnull 2]); | ^ 1 error generated. ``` It seems like the `_GNU_SOURCE` macro should be defined because of the [`pipe2` function](https://linux.die.net/man/2/pipe). Authored-By: Jiwoo Park (@jimmy-park)
bradh352
pushed a commit
that referenced
this pull request
Nov 9, 2024
I've got the following error while building c-ares on Android. ``` FAILED: _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o /Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang --target=armv7-none-linux-androideabi33 --sysroot=/Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -DCARES_BUILDING_LIBRARY -DHAVE_CONFIG_H=1 -DCMAKE_INTDIR=\"Debug\" -I/Users/jimmy.park/test-c-ares/build/android-arm/_deps/c-ares-source-build -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6 -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/include -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -Wall -Wextra -Waggregate-return -Wcast-align -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdouble-promotion -Wfloat-equal -Wformat-security -Winit-self -Wmissing-braces -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpedantic -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow -Wstrict-prototypes -Wundef -Wunreachable-code -Wunused -Wvariadic-macros -Wvla -Wwrite-strings -Werror=implicit-int -Werror=implicit-function-declaration -Werror=partial-availability -Qunused-arguments -Wno-long-long -fdiagnostics-color=always -fcolor-diagnostics -fno-limit-debug-info -fno-omit-frame-pointer -O0 -std=c99 -fPIC -fcolor-diagnostics -w -MD -MT _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o -MF _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o.d -o _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o -c /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c:68:7: error: call to undeclared function 'pipe2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 68 | if (pipe2(p->filedes, O_NONBLOCK | O_CLOEXEC) != 0) { | ^ /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c:68:7: note: did you mean 'pipe'? /Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/unistd.h:275:5: note: 'pipe' declared here 275 | int pipe(int __fds[_Nonnull 2]); | ^ 1 error generated. ``` It seems like the `_GNU_SOURCE` macro should be defined because of the [`pipe2` function](https://linux.die.net/man/2/pipe). Authored-By: Jiwoo Park (@jimmy-park)
bradh352
pushed a commit
that referenced
this pull request
Nov 9, 2024
I've got the following error while building c-ares on Android. ``` FAILED: _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o /Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang --target=armv7-none-linux-androideabi33 --sysroot=/Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -DCARES_BUILDING_LIBRARY -DHAVE_CONFIG_H=1 -DCMAKE_INTDIR=\"Debug\" -I/Users/jimmy.park/test-c-ares/build/android-arm/_deps/c-ares-source-build -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6 -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/include -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib -I/Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -Wall -Wextra -Waggregate-return -Wcast-align -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdouble-promotion -Wfloat-equal -Wformat-security -Winit-self -Wmissing-braces -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpedantic -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow -Wstrict-prototypes -Wundef -Wunreachable-code -Wunused -Wvariadic-macros -Wvla -Wwrite-strings -Werror=implicit-int -Werror=implicit-function-declaration -Werror=partial-availability -Qunused-arguments -Wno-long-long -fdiagnostics-color=always -fcolor-diagnostics -fno-limit-debug-info -fno-omit-frame-pointer -O0 -std=c99 -fPIC -fcolor-diagnostics -w -MD -MT _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o -MF _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o.d -o _deps/c-ares-source-build/src/lib/CMakeFiles/c-ares.dir/Debug/event/ares_event_wake_pipe.c.o -c /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c:68:7: error: call to undeclared function 'pipe2'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 68 | if (pipe2(p->filedes, O_NONBLOCK | O_CLOEXEC) != 0) { | ^ /Users/jimmy.park/test-c-ares/build/.cache/c-ares-source/b6ff14176cd38f824ca7aa8b1acab422ed5556a6/src/lib/event/ares_event_wake_pipe.c:68:7: note: did you mean 'pipe'? /Users/jimmy.park/Library/Android/sdk/ndk/27.2.12479018/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/unistd.h:275:5: note: 'pipe' declared here 275 | int pipe(int __fds[_Nonnull 2]); | ^ 1 error generated. ``` It seems like the `_GNU_SOURCE` macro should be defined because of the [`pipe2` function](https://linux.die.net/man/2/pipe). Authored-By: Jiwoo Park (@jimmy-park)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've got the following error while building c-ares on Android.
It seems like the
_GNU_SOURCE
macro should be defined because of thepipe2
function.