Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-ffmpeg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
run: |
brew update
brew unlink gettext libidn2 libpng libtiff libunistring libx11 libxau libxcb libxdmcp little-cms2 unbound
- uses: msys2/setup-msys2@c52d1fa9c7492275e60fe763540fb601f5f232a1
- uses: msys2/setup-msys2@v2
if: matrix.os == 'windows-latest'
with:
install: base-devel mingw-w64-x86_64-gcc mingw-w64-x86_64-gperf mingw-w64-x86_64-nasm openssl-devel
Expand Down
11 changes: 11 additions & 0 deletions patches/gmp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- gmp-6.3.0/configure 2023-07-29 15:42:22.000000000 +0200
+++ gmp/configure 2025-02-03 22:00:33.567817886 +0100
@@ -6568,7 +6566,7 @@

#if defined (__GNUC__) && ! defined (__cplusplus)
typedef unsigned long long t1;typedef t1*t2;
-void g(){}
+void g(int a,t1 const*b,t1 c,t2 d,t1 const*e,int f){}
void h(){}
static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
26 changes: 26 additions & 0 deletions patches/winpthreads.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Temporary patch for this issue:

https://sourceforge.net/p/mingw-w64/mailman/message/59184409/

This patch can be removed once msys2's packages have been updated.

--- a/mingw-w64-libraries/winpthreads/include/pthread_time.h
+++ b/mingw-w64-libraries/winpthreads/include/pthread_time.h
@@ -23,6 +23,7 @@
#ifndef WIN_PTHREADS_TIME_H
#define WIN_PTHREADS_TIME_H

+#include <sys/timeb.h>
#include "pthread_compat.h"

/* Posix timers are supported */
--- a/mingw-w64-libraries/winpthreads/include/semaphore.h
+++ b/mingw-w64-libraries/winpthreads/include/semaphore.h
@@ -23,6 +23,7 @@
#ifndef WIN_PTHREADS_SEMAPHORE_H
#define WIN_PTHREADS_SEMAPHORE_H

+#include <sys/timeb.h>
#include "pthread_compat.h"

#ifdef __cplusplus
4 changes: 4 additions & 0 deletions scripts/build-ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,10 @@ def main():
builder = Builder(dest_dir=dest_dir)
builder.create_directories()

# Fix winpthreads breakage until the fix reaches msys2 repos.
if plat == "Windows":
run(["patch", "-d", "C:/msys64/mingw64", "-i", os.path.join(builder.patch_dir, "winpthreads.patch"), "-p3"])

# install packages
available_tools = set()
if plat == "Windows":
Expand Down