summaryrefslogtreecommitdiff
path: root/sysutils/aperture/patches
diff options
context:
space:
mode:
authorwennmach <wennmach@pkgsrc.org>2003-11-11 13:00:24 +0000
committerwennmach <wennmach@pkgsrc.org>2003-11-11 13:00:24 +0000
commit225d4df044d84b58b04b73f5be27dd5186767235 (patch)
tree25e05df3441190c2b336ee1a116690e88edaae38 /sysutils/aperture/patches
parent684554cf0b761bf0d9a13645cc1548733c378261 (diff)
downloadpkgsrc-225d4df044d84b58b04b73f5be27dd5186767235.tar.gz
Do not define cpu_id, cpu_feature, and cpu_vendor directly; leave that
to machine/cpu.h - avoiding conflicts when the definitions in cpu.h change. Fixes PR pkg/23371 by Jukka Salmi < jukka-netbsd AT 2003 DOT salmi DOT ch >
Diffstat (limited to 'sysutils/aperture/patches')
-rw-r--r--sysutils/aperture/patches/patch-ab34
1 files changed, 22 insertions, 12 deletions
diff --git a/sysutils/aperture/patches/patch-ab b/sysutils/aperture/patches/patch-ab
index 790df0be3fa..5e8b20e7a53 100644
--- a/sysutils/aperture/patches/patch-ab
+++ b/sysutils/aperture/patches/patch-ab
@@ -1,24 +1,35 @@
-$NetBSD: patch-ab,v 1.6 2002/11/10 07:59:03 tron Exp $
+$NetBSD: patch-ab,v 1.7 2003/11/11 13:00:24 wennmach Exp $
---- module/xf86_mod.c.orig Fri Jul 5 01:36:35 2002
-+++ module/xf86_mod.c Thu Oct 10 22:37:41 2002
-@@ -17,9 +17,15 @@
+o add support for cpu_info (for recent kernel versions)
+o do not define cpu_id, cpu_feature, cpu_vendor directly; leave that
+ to machine/cpu.h
+
+--- module/xf86_mod.c.orig Fri Nov 7 16:29:19 2003
++++ module/xf86_mod.c Fri Nov 7 16:36:27 2003
+@@ -10,6 +10,7 @@
+ #include <sys/lkm.h>
+ #include <sys/malloc.h>
+
++#include <machine/cpu.h>
+ #include <machine/specialreg.h>
+
+ #include "xf86_reg.h"
+@@ -17,9 +18,11 @@
#include "memrange.h"
/* Pull in the cpuid values from locore.s */
+-extern int cpu_id;
+-extern int cpu_feature;
+-extern char cpu_vendor[];
+#if __NetBSD_Version__ >= 106080000
+extern struct cpu_info cpu_info_primary;
+#define cpu_vendor ((char *)cpu_info_primary.ci_vendor)
+#define cpu_id cpu_info_primary.ci_signature
-+#else
- extern int cpu_id;
- extern int cpu_feature;
- extern char cpu_vendor[];
+#endif
extern struct mem_range_ops i686_mrops, k6_mrops;
-@@ -31,7 +37,11 @@
+@@ -31,7 +34,11 @@
0,
seltrue, xf86mmap, 0};
@@ -30,13 +41,12 @@ $NetBSD: patch-ab,v 1.6 2002/11/10 07:59:03 tron Exp $
char *xf86_major_version = "2";
char *xf86_minor_version = "0";
-@@ -76,7 +86,10 @@
+@@ -76,7 +83,10 @@
case LKM_E_UNLOAD:
/* Free allocated memory */
-- free(mem_range_softc.mr_desc, M_MEMDESC);
+ if (mem_range_softc.mr_desc != NULL) {
-+ free(mem_range_softc.mr_desc, M_MEMDESC);
+ free(mem_range_softc.mr_desc, M_MEMDESC);
+ mem_range_softc.mr_desc = NULL;
+ }
break;