| @@ -720,12 +720,12 @@ add_library( ${BINARY_NAME} | |||||
| "../../../../../modules/juce_core/native/juce_linux_Threads.cpp" | "../../../../../modules/juce_core/native/juce_linux_Threads.cpp" | ||||
| "../../../../../modules/juce_core/native/juce_mac_ClangBugWorkaround.h" | "../../../../../modules/juce_core/native/juce_mac_ClangBugWorkaround.h" | ||||
| "../../../../../modules/juce_core/native/juce_mac_Files.mm" | "../../../../../modules/juce_core/native/juce_mac_Files.mm" | ||||
| "../../../../../modules/juce_core/native/juce_mac_linux_IPAddress.h" | |||||
| "../../../../../modules/juce_core/native/juce_mac_Network.mm" | "../../../../../modules/juce_core/native/juce_mac_Network.mm" | ||||
| "../../../../../modules/juce_core/native/juce_mac_Strings.mm" | "../../../../../modules/juce_core/native/juce_mac_Strings.mm" | ||||
| "../../../../../modules/juce_core/native/juce_mac_SystemStats.mm" | "../../../../../modules/juce_core/native/juce_mac_SystemStats.mm" | ||||
| "../../../../../modules/juce_core/native/juce_mac_Threads.mm" | "../../../../../modules/juce_core/native/juce_mac_Threads.mm" | ||||
| "../../../../../modules/juce_core/native/juce_osx_ObjCHelpers.h" | "../../../../../modules/juce_core/native/juce_osx_ObjCHelpers.h" | ||||
| "../../../../../modules/juce_core/native/juce_posix_IPAddress.h" | |||||
| "../../../../../modules/juce_core/native/juce_posix_NamedPipe.cpp" | "../../../../../modules/juce_core/native/juce_posix_NamedPipe.cpp" | ||||
| "../../../../../modules/juce_core/native/juce_posix_SharedCode.h" | "../../../../../modules/juce_core/native/juce_posix_SharedCode.h" | ||||
| "../../../../../modules/juce_core/native/juce_win32_ComSmartPtr.h" | "../../../../../modules/juce_core/native/juce_win32_ComSmartPtr.h" | ||||
| @@ -2288,12 +2288,12 @@ set_source_files_properties("../../../../../modules/juce_core/native/juce_linux_ | |||||
| set_source_files_properties("../../../../../modules/juce_core/native/juce_linux_Threads.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) | set_source_files_properties("../../../../../modules/juce_core/native/juce_linux_Threads.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) | ||||
| set_source_files_properties("../../../../../modules/juce_core/native/juce_mac_ClangBugWorkaround.h" PROPERTIES HEADER_FILE_ONLY TRUE) | set_source_files_properties("../../../../../modules/juce_core/native/juce_mac_ClangBugWorkaround.h" PROPERTIES HEADER_FILE_ONLY TRUE) | ||||
| set_source_files_properties("../../../../../modules/juce_core/native/juce_mac_Files.mm" PROPERTIES HEADER_FILE_ONLY TRUE) | set_source_files_properties("../../../../../modules/juce_core/native/juce_mac_Files.mm" PROPERTIES HEADER_FILE_ONLY TRUE) | ||||
| set_source_files_properties("../../../../../modules/juce_core/native/juce_mac_linux_IPAddress.h" PROPERTIES HEADER_FILE_ONLY TRUE) | |||||
| set_source_files_properties("../../../../../modules/juce_core/native/juce_mac_Network.mm" PROPERTIES HEADER_FILE_ONLY TRUE) | set_source_files_properties("../../../../../modules/juce_core/native/juce_mac_Network.mm" PROPERTIES HEADER_FILE_ONLY TRUE) | ||||
| set_source_files_properties("../../../../../modules/juce_core/native/juce_mac_Strings.mm" PROPERTIES HEADER_FILE_ONLY TRUE) | set_source_files_properties("../../../../../modules/juce_core/native/juce_mac_Strings.mm" PROPERTIES HEADER_FILE_ONLY TRUE) | ||||
| set_source_files_properties("../../../../../modules/juce_core/native/juce_mac_SystemStats.mm" PROPERTIES HEADER_FILE_ONLY TRUE) | set_source_files_properties("../../../../../modules/juce_core/native/juce_mac_SystemStats.mm" PROPERTIES HEADER_FILE_ONLY TRUE) | ||||
| set_source_files_properties("../../../../../modules/juce_core/native/juce_mac_Threads.mm" PROPERTIES HEADER_FILE_ONLY TRUE) | set_source_files_properties("../../../../../modules/juce_core/native/juce_mac_Threads.mm" PROPERTIES HEADER_FILE_ONLY TRUE) | ||||
| set_source_files_properties("../../../../../modules/juce_core/native/juce_osx_ObjCHelpers.h" PROPERTIES HEADER_FILE_ONLY TRUE) | set_source_files_properties("../../../../../modules/juce_core/native/juce_osx_ObjCHelpers.h" PROPERTIES HEADER_FILE_ONLY TRUE) | ||||
| set_source_files_properties("../../../../../modules/juce_core/native/juce_posix_IPAddress.h" PROPERTIES HEADER_FILE_ONLY TRUE) | |||||
| set_source_files_properties("../../../../../modules/juce_core/native/juce_posix_NamedPipe.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) | set_source_files_properties("../../../../../modules/juce_core/native/juce_posix_NamedPipe.cpp" PROPERTIES HEADER_FILE_ONLY TRUE) | ||||
| set_source_files_properties("../../../../../modules/juce_core/native/juce_posix_SharedCode.h" PROPERTIES HEADER_FILE_ONLY TRUE) | set_source_files_properties("../../../../../modules/juce_core/native/juce_posix_SharedCode.h" PROPERTIES HEADER_FILE_ONLY TRUE) | ||||
| set_source_files_properties("../../../../../modules/juce_core/native/juce_win32_ComSmartPtr.h" PROPERTIES HEADER_FILE_ONLY TRUE) | set_source_files_properties("../../../../../modules/juce_core/native/juce_win32_ComSmartPtr.h" PROPERTIES HEADER_FILE_ONLY TRUE) | ||||
| @@ -2579,8 +2579,8 @@ | |||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_android_JNIHelpers.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_android_JNIHelpers.h"/> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_BasicNativeHeaders.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_BasicNativeHeaders.h"/> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_ClangBugWorkaround.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_ClangBugWorkaround.h"/> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_linux_IPAddress.h"/> | |||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_osx_ObjCHelpers.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_osx_ObjCHelpers.h"/> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_IPAddress.h"/> | |||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_SharedCode.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_SharedCode.h"/> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_win32_ComSmartPtr.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_win32_ComSmartPtr.h"/> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_IPAddress.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_IPAddress.h"/> | ||||
| @@ -3918,10 +3918,10 @@ | |||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_ClangBugWorkaround.h"> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_ClangBugWorkaround.h"> | ||||
| <Filter>JUCE Modules\juce_core\native</Filter> | <Filter>JUCE Modules\juce_core\native</Filter> | ||||
| </ClInclude> | </ClInclude> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_linux_IPAddress.h"> | |||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_osx_ObjCHelpers.h"> | |||||
| <Filter>JUCE Modules\juce_core\native</Filter> | <Filter>JUCE Modules\juce_core\native</Filter> | ||||
| </ClInclude> | </ClInclude> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_osx_ObjCHelpers.h"> | |||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_IPAddress.h"> | |||||
| <Filter>JUCE Modules\juce_core\native</Filter> | <Filter>JUCE Modules\juce_core\native</Filter> | ||||
| </ClInclude> | </ClInclude> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_SharedCode.h"> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_SharedCode.h"> | ||||
| @@ -2579,8 +2579,8 @@ | |||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_android_JNIHelpers.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_android_JNIHelpers.h"/> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_BasicNativeHeaders.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_BasicNativeHeaders.h"/> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_ClangBugWorkaround.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_ClangBugWorkaround.h"/> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_linux_IPAddress.h"/> | |||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_osx_ObjCHelpers.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_osx_ObjCHelpers.h"/> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_IPAddress.h"/> | |||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_SharedCode.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_SharedCode.h"/> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_win32_ComSmartPtr.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_win32_ComSmartPtr.h"/> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_IPAddress.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_IPAddress.h"/> | ||||
| @@ -3918,10 +3918,10 @@ | |||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_ClangBugWorkaround.h"> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_ClangBugWorkaround.h"> | ||||
| <Filter>JUCE Modules\juce_core\native</Filter> | <Filter>JUCE Modules\juce_core\native</Filter> | ||||
| </ClInclude> | </ClInclude> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_linux_IPAddress.h"> | |||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_osx_ObjCHelpers.h"> | |||||
| <Filter>JUCE Modules\juce_core\native</Filter> | <Filter>JUCE Modules\juce_core\native</Filter> | ||||
| </ClInclude> | </ClInclude> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_osx_ObjCHelpers.h"> | |||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_IPAddress.h"> | |||||
| <Filter>JUCE Modules\juce_core\native</Filter> | <Filter>JUCE Modules\juce_core\native</Filter> | ||||
| </ClInclude> | </ClInclude> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_SharedCode.h"> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_SharedCode.h"> | ||||
| @@ -2581,8 +2581,8 @@ | |||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_android_JNIHelpers.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_android_JNIHelpers.h"/> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_BasicNativeHeaders.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_BasicNativeHeaders.h"/> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_ClangBugWorkaround.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_ClangBugWorkaround.h"/> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_linux_IPAddress.h"/> | |||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_osx_ObjCHelpers.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_osx_ObjCHelpers.h"/> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_IPAddress.h"/> | |||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_SharedCode.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_SharedCode.h"/> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_win32_ComSmartPtr.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_win32_ComSmartPtr.h"/> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_IPAddress.h"/> | <ClInclude Include="..\..\..\..\modules\juce_core\network\juce_IPAddress.h"/> | ||||
| @@ -3918,10 +3918,10 @@ | |||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_ClangBugWorkaround.h"> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_ClangBugWorkaround.h"> | ||||
| <Filter>JUCE Modules\juce_core\native</Filter> | <Filter>JUCE Modules\juce_core\native</Filter> | ||||
| </ClInclude> | </ClInclude> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_mac_linux_IPAddress.h"> | |||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_osx_ObjCHelpers.h"> | |||||
| <Filter>JUCE Modules\juce_core\native</Filter> | <Filter>JUCE Modules\juce_core\native</Filter> | ||||
| </ClInclude> | </ClInclude> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_osx_ObjCHelpers.h"> | |||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_IPAddress.h"> | |||||
| <Filter>JUCE Modules\juce_core\native</Filter> | <Filter>JUCE Modules\juce_core\native</Filter> | ||||
| </ClInclude> | </ClInclude> | ||||
| <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_SharedCode.h"> | <ClInclude Include="..\..\..\..\modules\juce_core\native\juce_posix_SharedCode.h"> | ||||
| @@ -105,6 +105,7 @@ | |||||
| #endif | #endif | ||||
| #if JUCE_ANDROID | #if JUCE_ANDROID | ||||
| #include <ifaddrs.h> | |||||
| #include <android/log.h> | #include <android/log.h> | ||||
| #endif | #endif | ||||
| @@ -186,12 +187,14 @@ | |||||
| #if ! JUCE_WINDOWS | #if ! JUCE_WINDOWS | ||||
| #include "native/juce_posix_SharedCode.h" | #include "native/juce_posix_SharedCode.h" | ||||
| #include "native/juce_posix_NamedPipe.cpp" | #include "native/juce_posix_NamedPipe.cpp" | ||||
| #if ! JUCE_ANDROID || __ANDROID_API__ >= 24 | |||||
| #include "native/juce_posix_IPAddress.h" | |||||
| #endif | |||||
| #endif | #endif | ||||
| //============================================================================== | //============================================================================== | ||||
| #if JUCE_MAC || JUCE_IOS | #if JUCE_MAC || JUCE_IOS | ||||
| #include "native/juce_mac_Files.mm" | #include "native/juce_mac_Files.mm" | ||||
| #include "native/juce_mac_linux_IPAddress.h" | |||||
| #include "native/juce_mac_Network.mm" | #include "native/juce_mac_Network.mm" | ||||
| #include "native/juce_mac_Strings.mm" | #include "native/juce_mac_Strings.mm" | ||||
| #include "native/juce_mac_SystemStats.mm" | #include "native/juce_mac_SystemStats.mm" | ||||
| @@ -209,7 +212,6 @@ | |||||
| #elif JUCE_LINUX | #elif JUCE_LINUX | ||||
| #include "native/juce_linux_CommonFile.cpp" | #include "native/juce_linux_CommonFile.cpp" | ||||
| #include "native/juce_linux_Files.cpp" | #include "native/juce_linux_Files.cpp" | ||||
| #include "native/juce_mac_linux_IPAddress.h" | |||||
| #include "native/juce_linux_Network.cpp" | #include "native/juce_linux_Network.cpp" | ||||
| #if JUCE_USE_CURL | #if JUCE_USE_CURL | ||||
| #include "native/juce_curl_Network.cpp" | #include "native/juce_curl_Network.cpp" | ||||
| @@ -342,6 +342,8 @@ URL::DownloadTask* URL::downloadToFile (const File& targetLocation, String extra | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| #if __ANDROID_API__ < 24 // Android support for getifadds was added in Android 7.0 (API 24) so the posix implementation does not apply | |||||
| static IPAddress makeAddress (const sockaddr_in *addr_in) | static IPAddress makeAddress (const sockaddr_in *addr_in) | ||||
| { | { | ||||
| if (addr_in->sin_addr.s_addr == INADDR_NONE) | if (addr_in->sin_addr.s_addr == INADDR_NONE) | ||||
| @@ -382,15 +384,15 @@ static Array<InterfaceInfo> findIPAddresses (int dummySocket) | |||||
| if (item.ifr_addr.sa_family == AF_INET) | if (item.ifr_addr.sa_family == AF_INET) | ||||
| { | { | ||||
| InterfaceInfo i; | |||||
| i.interfaceAddress = makeAddress ((const sockaddr_in*) &item.ifr_addr); | |||||
| InterfaceInfo info; | |||||
| info.interfaceAddress = makeAddress ((const sockaddr_in*) &item.ifr_addr); | |||||
| if (! i.interfaceAddress.isNull()) | |||||
| if (! info.interfaceAddress.isNull()) | |||||
| { | { | ||||
| if (ioctl (dummySocket, SIOCGIFBRDADDR, &item) == 0) | if (ioctl (dummySocket, SIOCGIFBRDADDR, &item) == 0) | ||||
| i.broadcastAddress = makeAddress ((const sockaddr_in*) &item.ifr_broadaddr); | |||||
| info.broadcastAddress = makeAddress ((const sockaddr_in*) &item.ifr_broadaddr); | |||||
| result.add (i); | |||||
| result.add (info); | |||||
| } | } | ||||
| } | } | ||||
| else if (item.ifr_addr.sa_family == AF_INET6) | else if (item.ifr_addr.sa_family == AF_INET6) | ||||
| @@ -429,5 +431,6 @@ IPAddress IPAddress::getInterfaceBroadcastAddress (const IPAddress& address) | |||||
| return {}; | return {}; | ||||
| } | } | ||||
| #endif | |||||
| } // namespace juce | } // namespace juce | ||||