FreeBSD Bugzilla – Attachment 232781 Details for
Bug 262889
games/ezquake: fix build on arm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fix build on arm
ezquake.diff (text/plain), 1.20 KB, created by
Vladimir Druzenko
on 2022-03-28 15:00:17 UTC
(
hide
)
Description:
fix build on arm
Filename:
MIME Type:
Creator:
Vladimir Druzenko
Created:
2022-03-28 15:00:17 UTC
Size:
1.20 KB
patch
obsolete
>diff -ur games/ezquake.orig/files/patch-host.c games/ezquake/files/patch-host.c >--- games/ezquake.orig/files/patch-host.c >+++ games/ezquake/files/patch-host.c >@@ -1,9 +1,10 @@ >---- host.c.orig 2020-09-16 22:08:02 UTC >+--- host.c.orig > +++ host.c >-@@ -333,11 +333,19 @@ void SYSINFO_Init(void) >+@@ -333,16 +333,30 @@ > SYSINFO_processor_description = cpu_model; > > gettimeofday(&old_tp, NULL); >++#if defined(__powerpc__) || defined(__i386__) || defined(__amd64__) > +#ifdef __powerpc__ > + __asm__ __volatile__("mfspr %%r3, 268": "=r" (old_tsc)); > +#else >@@ -20,7 +21,17 @@ > SYSINFO_MHz = (int)((tsc_freq - old_tsc) / > (tp.tv_sec - old_tp.tv_sec + (tp.tv_usec - old_tp.tv_usec) / 1000000.) / > 1000000. + .5); >-@@ -351,7 +359,7 @@ void SYSINFO_Init(void) >+ // VVD: We can use sysctl hw.clockrate, but it don't work on i486 - always 0. >+ // Must work on Pentium 1/2/3; tested on Pentium 4. And RELENG_4 have no this sysctl. >++#else >++ len = sizeof(val); >++ sysctlbyname("dev.cpu.0.freq", &val, &len, NULL, 0); >++ SYSINFO_MHz = val; >++#endif >+ >+ if (gl_renderer && gl_renderer[0]) { >+ if (SYSINFO_3D_description != NULL) { >+@@ -351,7 +365,7 @@ > SYSINFO_3D_description = Q_strdup(gl_renderer); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 262889
: 232781