David created THRIFT-1865:
-----------------------------
Summary: Thrift don't build on Android
Key: THRIFT-1865
URL: https://issues.apache.org/jira/browse/THRIFT-1865
Project: Thrift
Issue Type: Bug
Components: C++ - Library
Affects Versions: 1.0
Environment: Debian Gnu/linux, using Android NDK r8d.
Reporter: David
Priority: Critical
Cross-compiling Thrift development version to Android give me the following
error:
""In file included from
/android-ndk-r8d/platforms/android-9/arch-arm/usr/include/sys/un.h:31:0,
from /thrift/lib/cpp/src/thrift/transport/TSocket.cpp:26:
/android-ndk-r8d/platforms/android-9/arch-arm/usr/include/linux/un.h:18:2:
error: 'sa_family_t' does not name a type
/thrift/lib/cpp/src/thrift/transport/TSocket.cpp: In member function 'void
apache::thrift::transport::TSocket::openConnection(addrinfo*)':
/thrift/lib/cpp/src/thrift/transport/TSocket.cpp:250:13: error: 'struct
sockaddr_un' has no member named 'sun_family'
make[1]: ***
[obj/local/armeabi/objs/thrift-static/src/thrift/transport/TSocket.o] Error 1""
Looking throught the git repository I found this commit: "THRIFT-1740 Make C++
library build on OS X and iOS".
It removes the import 'sys/socket.h' from socket.ccp needed by the struct
'sockaddr_un'. The problems arises because on some kernels versions the header
'linux/un.h' didn't include 'linux/socket.h' and didnt have sa_family_t defined.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira