Skip to content

Commit e2e4e71

Browse files
[Android] Fix NetworkInterface.GetAllNetworkInterfaces on API 21-23 (#76541)
* Bring back pal_ifaddrs * Update the header file
1 parent 32e856a commit e2e4e71

File tree

4 files changed

+804
-7
lines changed

4 files changed

+804
-7
lines changed

src/native/libs/System.Native/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ append_extra_system_libs(NATIVE_LIBS_EXTRA)
9090

9191
if (CLR_CMAKE_TARGET_ANDROID AND NOT HAVE_GETIFADDRS)
9292
add_definitions(-DANDROID_GETIFADDRS_WORKAROUND)
93+
add_compile_options(-Wno-gnu-zero-variadic-macro-arguments)
94+
95+
list (APPEND NATIVE_LIBS_EXTRA -llog)
96+
list (APPEND NATIVE_SOURCES pal_ifaddrs.c)
9397
endif ()
9498

9599
if (GEN_SHARED_LIB)

0 commit comments

Comments
 (0)