[vlc-commits] [Git][videolan/vlc][3.0.x] v4l2: dlopen proper library name on OpenBSD

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Nov 3 07:18:54 UTC 2022



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
ce9a09a2 by Brad Smith at 2022-11-03T06:58:05+00:00
v4l2: dlopen proper library name on OpenBSD

(cherry picked from commit ed4a5feb243a201b7890672f3d376b4586a16593)

- - - - -


1 changed file:

- modules/access/v4l2/lib.c


Changes:

=====================================
modules/access/v4l2/lib.c
=====================================
@@ -31,6 +31,12 @@
 
 #include "v4l2.h"
 
+#ifdef __OpenBSD__
+#define V4L2_LIB "libv4l2.so"
+#else
+#define V4L2_LIB "libv4l2.so.0"
+#endif
+
 static int fd_open (int fd, int flags)
 {
     (void) flags;
@@ -56,7 +62,7 @@ static void v4l2_lib_load (void)
 
     h = dlopen ("libmediaclient.so", RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
     if (h == NULL)
-        h = dlopen ("libv4l2.so.0", RTLD_LAZY | RTLD_LOCAL);
+        h = dlopen (V4L2_LIB, RTLD_LAZY | RTLD_LOCAL);
     if (h == NULL)
         return;
 



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

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