Project

General

Profile

Actions

Bug #1234

closed

'fd_set' type not declared

Added by Alex A. almost 9 years ago. Updated almost 9 years ago.

Status:
Completed
Priority:
High
Assignee:
Category:
libcrystax
Target version:
Start date:
01/21/2016
Due date:
% Done:

100%

Estimated time:
CPU Architecture:
arm, mips, x86
Host OS:
Toolchain:
clang-3.7, gcc-4.9
Android version:
4.4 (android-19)
CrystaX NDK Version:

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

include.txt (33.3 KB) include.txt Alex A., 01/22/2016 02:54 AM
Actions #1

Updated by Dmitry M. almost 9 years ago

  • 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.

Actions #2

Updated by Alex A. almost 9 years ago

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).

Actions #3

Updated by Dmitry M. almost 9 years ago

  • 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
Actions #4

Updated by Dmitry M. almost 9 years ago

  • Status changed from In Progress to Completed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF