From ffa86cc96088c11a43f5b5dd986222f4714b1dcb Mon Sep 17 00:00:00 2001 From: oreo639 Date: Mon, 7 Apr 2025 13:59:04 -0700 Subject: [PATCH] vlc: fix build with gcc14 and musl --- srcpkgs/vlc/patches/musl.patch | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 srcpkgs/vlc/patches/musl.patch diff --git a/srcpkgs/vlc/patches/musl.patch b/srcpkgs/vlc/patches/musl.patch new file mode 100644 index 00000000000..1915b775056 --- /dev/null +++ b/srcpkgs/vlc/patches/musl.patch @@ -0,0 +1,30 @@ +diff -rup vlc-3.0.21/modules/access/v4l2/v4l2.h.orig vlc-3.0.21/modules/access/v4l2/v4l2.h +--- vlc-3.0.21/modules/access/v4l2/v4l2.h.orig ++++ vlc-3.0.21/modules/access/v4l2/v4l2.h +@@ -28,7 +28,11 @@ + /* libv4l2 functions */ + extern int (*v4l2_fd_open) (int, int); + extern int (*v4l2_close) (int); ++#if defined(__GLIBC__) + extern int (*v4l2_ioctl) (int, unsigned long int, ...); ++#else ++extern int (*v4l2_ioctl) (int, int, ...); ++#endif + extern ssize_t (*v4l2_read) (int, void *, size_t); + extern void * (*v4l2_mmap) (void *, size_t, int, int, int, int64_t); + extern int (*v4l2_munmap) (void *, size_t); +diff -rup vlc-3.0.21/modules/access/v4l2/lib.c.orig vlc-3.0.21/modules/access/v4l2/lib.c +--- vlc-3.0.21/modules/access/v4l2/lib.c.orig ++++ vlc-3.0.21/modules/access/v4l2/lib.c +@@ -49,7 +49,11 @@ int (*v4l2_fd_open) (int, int) = fd_open + //int (*v4l2_open) (const char *, int, ...) = open; + //int (*v4l2_dup) (const char *, int, ...) = dup; + int (*v4l2_close) (int) = close; ++#if defined(__GLIBC__) + int (*v4l2_ioctl) (int, unsigned long int, ...) = ioctl; ++#else ++int (*v4l2_ioctl) (int, int, ...) = ioctl; ++#endif + ssize_t (*v4l2_read) (int, void *, size_t) = read; + //ssize_t (*v4l2_write) (int, const void *, size_t) = write; + void * (*v4l2_mmap) (void *, size_t, int, int, int, int64_t) = mmap;