diff --git a/CMakeLists.txt b/CMakeLists.txt index e720420e..c2486e34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,7 +125,7 @@ endif() # Check if RT timers exists set(CMAKE_REQUIRED_INCLUDES time.h) set(CMAKE_REQUIRED_LIBRARIES ) -if(NOT DEFINED ENV{QNX_HOST} AND NOT APPLE AND NOT WIN32) +if((NOT DEFINED ENV{QNX_HOST}) AND (NOT APPLE) AND (NOT WIN32) AND (NOT DEFINED ANDROID_PLATFORM)) list(APPEND LIBS_MAIN rt) set(CMAKE_REQUIRED_LIBRARIES rt) endif() @@ -211,7 +211,9 @@ else() if(DEFINED ENV{QNX_HOST}) list(APPEND LIBS_MAIN socket) else() - list(APPEND LIBS_MAIN pthread util) + if (NOT DEFINED ANDROID_PLATFORM) + list(APPEND LIBS_MAIN pthread util) + endif() endif() endif() foreach(LIB_ ${LIBS_MAIN}) diff --git a/FindPIP.cmake b/FindPIP.cmake index be1d4c13..00ee988d 100644 --- a/FindPIP.cmake +++ b/FindPIP.cmake @@ -17,10 +17,13 @@ else() find_library(PIP_CRYPT_LIBRARY pip_crypt ${_DIR_}/lib/) find_library(PIP_FFTW_LIBRARY pip_fftw ${_DIR_}/lib/) if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") - find_library(PTHREAD_LIBRARY pthread) find_library(DL_LIBRARY dl) - find_library(UTIL_LIBRARY util) - list(APPEND PIP_LIBRARY ${PTHREAD_LIBRARY} ${DL_LIBRARY} ${UTIL_LIBRARY}) + list(APPEND PIP_LIBRARY ${DL_LIBRARY}) + if (NOT DEFINED ANDROID_PLATFORM) + find_library(PTHREAD_LIBRARY pthread) + find_library(UTIL_LIBRARY util) + list(APPEND PIP_LIBRARY ${PTHREAD_LIBRARY} ${UTIL_LIBRARY}) + endif() endif() set(PIP_INCLUDES ${_DIR_}/include/pip) set(PIP_CMG ${_DIR_}/bin/pip_cmg) diff --git a/src_main/core/pibase.h b/src_main/core/pibase.h index 5cfb4a13..3d2950de 100644 --- a/src_main/core/pibase.h +++ b/src_main/core/pibase.h @@ -106,7 +106,7 @@ #endif #ifdef ANDROID -# define tcdrain(fd) ioctl(fd, TCSBRK, 1) +///# define tcdrain(fd) ioctl(fd, TCSBRK, 1) //inline int wctomb(char * c, wchar_t w) {*c = ((char * )&w)[0]; return 1;} //inline int mbtowc(wchar_t * w, const char * c, size_t) {*w = ((wchar_t * )&c)[0]; return 1;} #endif @@ -141,7 +141,9 @@ # ifdef ANDROID # pragma GCC diagnostic ignored "-Wunused-parameter" # pragma GCC diagnostic ignored "-Wextra" -# pragma GCC diagnostic ignored "-Wliteral-suffix" +# pragma GCC diagnostic ignored "-Wc++11-extensions" +# pragma GCC diagnostic ignored "-Wundefined-bool-conversion" +//# pragma GCC diagnostic ignored "-Wliteral-suffix" # endif #endif diff --git a/src_main/io/piethernet.h b/src_main/io/piethernet.h index d0df6880..5e970024 100755 --- a/src_main/io/piethernet.h +++ b/src_main/io/piethernet.h @@ -26,7 +26,12 @@ #include "pitimer.h" #include "piiodevice.h" -class sockaddr; +#ifdef ANDROID +struct +#else +class +#endif + sockaddr; class PIP_EXPORT PIEthernet: public PIIODevice {