[vlc-commits] [Git][videolan/vlc][master] configure: fix building on OpenBSD and NetBSD

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Feb 18 16:16:45 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
60c225b3 by Brad Smith at 2025-02-18T15:05:52+00:00
configure: fix building on OpenBSD and NetBSD

OpenBSD and NetBSD do not have qsort_r().

- - - - -


2 changed files:

- configure.ac
- src/Makefile.am


Changes:

=====================================
configure.ac
=====================================
@@ -772,7 +772,7 @@ dnl Check for system libs needed
 need_libc=false
 
 dnl Check for usual libc functions
-AC_CHECK_FUNCS([accept4 dup3 fcntl flock fstatat fstatvfs fork getmntent_r getenv getpwuid_r isatty memalign mkostemp mmap open_memstream newlocale pipe2 posix_fadvise setlocale uselocale wordexp])
+AC_CHECK_FUNCS([accept4 dup3 fcntl flock fstatat fstatvfs fork getmntent_r getenv getpwuid_r isatty memalign mkostemp mmap open_memstream newlocale pipe2 posix_fadvise qsort_r setlocale uselocale wordexp])
 AC_REPLACE_FUNCS([aligned_alloc asprintf atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r lfind lldiv localtime_r memrchr nrand48 poll posix_memalign readv recvmsg rewind sendmsg setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strnstr strsep strtof strtok_r strtoll swab tdestroy tfind timegm timespec_get strverscmp vasprintf writev])
 AC_REPLACE_FUNCS([gettimeofday])
 AC_CHECK_FUNC(fdatasync,,
@@ -795,6 +795,8 @@ case "$SYS" in
     ;;
 esac
 
+AM_CONDITIONAL([HAVE_QSORT_R], [test "x$ac_cv_func_qsort_r" = "xyes"])
+
 AH_BOTTOM([#include <vlc_fixups.h>])
 
 dnl Check for struct timespec


=====================================
src/Makefile.am
=====================================
@@ -519,7 +519,7 @@ if !HAVE_LINUX
 libvlccore_la_SOURCES += posix/wait.c
 endif
 if !HAVE_ANDROID
-if !HAVE_EMSCRIPTEN
+if HAVE_QSORT_R
 libvlccore_la_SOURCES += posix/sort.c
 endif
 libvlccore_la_SOURCES += \



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/60c225b3e8ef18b537359b08980726156b453a4f

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/60c225b3e8ef18b537359b08980726156b453a4f
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