Page MenuHomeFreeBSD

D23246.diff
No OneTemporary

D23246.diff

Index: head/emulators/qemu40/Makefile
===================================================================
--- head/emulators/qemu40/Makefile
+++ head/emulators/qemu40/Makefile
@@ -3,7 +3,7 @@
PORTNAME= qemu
PORTVERSION= 4.0.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= emulators
MASTER_SITES= https://download.qemu.org/
PKGNAMESUFFIX= 40
Index: head/emulators/qemu40/files/patch-util-cacheinfo.c
===================================================================
--- head/emulators/qemu40/files/patch-util-cacheinfo.c
+++ head/emulators/qemu40/files/patch-util-cacheinfo.c
@@ -0,0 +1,41 @@
+--- util/cacheinfo.c.orig 2019-10-17 15:17:44.000000000 -0500
++++ util/cacheinfo.c 2020-01-17 21:13:29.459470000 -0600
+@@ -65,25 +65,28 @@ static void sys_cache_info(int *isize, int *dsize)
+ g_free(buf);
+ }
+
+-#elif defined(__APPLE__) \
+- || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
++#elif defined(__APPLE__)
+ # include <sys/sysctl.h>
+-# if defined(__APPLE__)
+-# define SYSCTL_CACHELINE_NAME "hw.cachelinesize"
+-# else
+-# define SYSCTL_CACHELINE_NAME "machdep.cacheline_size"
+-# endif
+-
+ static void sys_cache_info(int *isize, int *dsize)
+ {
+ /* There's only a single sysctl for both I/D cache line sizes. */
+ long size;
+ size_t len = sizeof(size);
+- if (!sysctlbyname(SYSCTL_CACHELINE_NAME, &size, &len, NULL, 0)) {
++ if (!sysctlbyname("hw.cachelinesize", &size, &len, NULL, 0)) {
+ *isize = *dsize = size;
+ }
+ }
+-
++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
++# include <sys/sysctl.h>
++static void sys_cache_info(int *isize, int *dsize)
++{
++ /* There's only a single sysctl for both I/D cache line sizes. */
++ int size;
++ size_t len = sizeof(size);
++ if (!sysctlbyname("machdep.cacheline_size", &size, &len, NULL, 0)) {
++ *isize = *dsize = size;
++ }
++}
+ #else
+ /* POSIX */
+

File Metadata

Mime Type
text/plain
Expires
Fri, Mar 27, 6:52 AM (13 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30414872
Default Alt Text
D23246.diff (1 KB)

Event Timeline