Bug #1234
closed
'fd_set' type not declared
Added by Alex A. over 8 years ago.
Updated about 8 years ago.
CPU Architecture:
arm, mips, x86
Toolchain:
clang-3.7, gcc-4.9
Android version:
4.4 (android-19)
Description
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.
Files
- Status changed from Open to Waiting for feedback
- Assignee set to Dmitry M.
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.
I've attached compilation result with -H
option.
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:
#if defined(ANDROID)
#include
#endif
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).
- Category set to libcrystax
- Status changed from Waiting for feedback to In Progress
- Priority changed from Normal to High
- Target version set to 11.0.0
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
Also available in: Atom
PDF