Browse Source

v4l2: dlopen proper library name on OpenBSD

Fixes #26573

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
pull/134/head
Brad Smith 4 years ago
committed by Rémi Denis-Courmont
parent
commit
ed4a5feb24
  1. 8
      modules/access/v4l2/lib.c

8
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;
@ -55,7 +61,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;

Loading…
Cancel
Save