[vlc-commits] [Git][videolan/vlc][master] contrib: zvbi: fix Android usage of pthread
    Steve Lhomme (@robUx4) 
    gitlab at videolan.org
       
    Fri Apr 12 11:16:43 UTC 2024
    
    
  
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
848b0f08 by Steve Lhomme at 2024-04-12T08:53:43+00:00
contrib: zvbi: fix Android usage of pthread
- pthread_create is not detected properly with the NDK26.
- pthread_cancel is called but it's not supported by Android, it's probably dead code that is removed during linking
- - - - -
1 changed file:
- contrib/src/zvbi/rules.mak
Changes:
=====================================
contrib/src/zvbi/rules.mak
=====================================
@@ -27,6 +27,8 @@ endif
 ifdef HAVE_ANDROID
 	$(APPLY) $(SRC)/zvbi/zvbi-android.patch
 endif
+	# check for pthread_create in pthreads as well
+	sed -i.orig "s/AC_CHECK_LIB(pthread, pthread_create,,/AC_SEARCH_LIBS([pthread_create], [pthread pthreads],,/" $(UNPACK_DIR)/configure.in
 	$(MOVE)
 
 DEPS_zvbi = png $(DEPS_png) iconv $(DEPS_iconv)
@@ -36,6 +38,11 @@ ZVBICONF := \
 	--disable-nls --disable-proxy \
 	--without-doxygen
 
+ifdef HAVE_ANDROID
+# discard bogus pthread_cancel calls
+ZVBICONF += CFLAGS="$(CFLAGS) -Wno-implicit-function-declaration"
+endif
+
 ifdef HAVE_WIN32
 DEPS_zvbi += winpthreads $(DEPS_winpthreads)
 endif
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/848b0f08c10480079809c46951809da543fea39c
-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/848b0f08c10480079809c46951809da543fea39c
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
    
    
More information about the vlc-commits
mailing list