git: fd826f45f62e - main - multimedia/x264: Fix detection of cpu cores
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 14 Aug 2026 20:47:39 UTC
The branch main has been updated by diizzy:
URL: https://cgit.FreeBSD.org/ports/commit/?id=fd826f45f62edfb5b3886ab3635b3b2443831233
commit fd826f45f62edfb5b3886ab3635b3b2443831233
Author: Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2026-08-14 19:39:28 +0000
Commit: Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2026-08-14 20:47:33 +0000
multimedia/x264: Fix detection of cpu cores
Partially revert changes in upstream commit
da14df5535fd46776fb1c9da3130973295c87aca
References:
https://code.videolan.org/videolan/x264/-/commit/da14df5535fd46776fb1c9da3130973295c87aca
---
multimedia/x264/Makefile | 1 +
multimedia/x264/files/patch-common_cpu.c | 15 +++++++++++++++
2 files changed, 16 insertions(+)
diff --git a/multimedia/x264/Makefile b/multimedia/x264/Makefile
index 1cd1e1c91140..9f8a276701dc 100644
--- a/multimedia/x264/Makefile
+++ b/multimedia/x264/Makefile
@@ -1,5 +1,6 @@
PORTNAME= x264
DISTVERSION= 0.165.3223
+PORTREVISION= 1
CATEGORIES= multimedia
MAINTAINER= multimedia@FreeBSD.org
diff --git a/multimedia/x264/files/patch-common_cpu.c b/multimedia/x264/files/patch-common_cpu.c
new file mode 100644
index 000000000000..231c7d79c9ae
--- /dev/null
+++ b/multimedia/x264/files/patch-common_cpu.c
@@ -0,0 +1,15 @@
+--- common/cpu.c.orig 2026-08-13 20:46:48 UTC
++++ common/cpu.c
+@@ -658,10 +658,10 @@ int x264_cpu_num_processors( void )
+ get_system_info( &info );
+ return info.cpu_count;
+
+-#elif SYS_MACOSX
++#elif SYS_MACOSX || SYS_FREEBSD
+ int ncpu;
+ size_t length = sizeof( ncpu );
+- if( sysctlbyname("hw.logicalcpu", &ncpu, &length, NULL, 0) )
++ if( sysctlbyname("hw.ncpu", &ncpu, &length, NULL, 0) )
+ {
+ ncpu = 1;
+ }