'fd_set' type not declared
When compiling with CrystaX 10.3.1, I got the following error that didn't exist with 10.2 (didn't try with 10.3.0):
In file included from jni/cryptopp/network.cpp:5:0:
jni/cryptopp/wait.h:184:2: error: 'fd_set' does not name a type
fd_set m_readfds, m_writefds;
I've tried with armeabi, x86, and mips ABIs. I suspect the same applied for others.
#1 Updated by Dmitry Moskalchuk over 3 years ago
- Status changed from Open to Waiting for feedback
- Assignee set to Dmitry Moskalchuk
According to "POSIX":http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_select.h.html, @fd_set@ is defined in @sys/select.h@. It works in CrystaX NDK 10.3.1.
However, such things can happen when switching from previous CrystaX NDK version to the latest one, since we're working on providing complete POSIX implementation and change public headers occasionally to make it working. Is it regression or not, depends on point of view. Strictly speaking, this is not regression, since we confirm POSIX requirements; however, I'd like to make CrystaX NDK to fit not only requirements, but typical use cases too. In other words, if your code compiles fine without explicit inclusion of @sys/select.h@ on GNU/Linux and/or OS X (the most widely used POSIX-conforming modern operating systems), I'd like to fix it in CrystaX NDK and make other headers implicitly include @sys/select.h@ too; if not, then I'd prefer not touch CrystaX NDK headers, and would suggest you fix it in your code by including @sys/select.h@.
Please provide more details - what exactly was included in jni/cryptopp/network.cpp and, specifically, in jni/cryptopp/wait.h. The preprocessed jni/cryptopp/network.cpp would be even better.
#2 Updated by Alex Afanasyev over 3 years ago
I've attached compilation result with
I can also confirm that including
sys/select.h solves the problem. In fact, the upstream of the project I'm compiling (cryptopp) has included the fix, but they did that in android specific way, suggesting that only Android is such strong with POSIX-compliance:
The older code is compiling fine on all other platforms (Linux, Freebsd, OSX, etc.) and was compiled successfully with previous versions of CrystaX (definitely with 10.2.1).
#4 Updated by Dmitry Moskalchuk over 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
"Done":https://github.com/crystax/android-platform-ndk/commit/3bc93d1bba2510ce0114c764f828f52b7209b2fd. Will be available in NDK starting from build #798 (https://dl.crystax.net/builds/).