047f1d9347
supplied by Stephen Ma in PR pkg/18925. Bump the package revision to reflect this change.
44 lines
1.1 KiB
Text
44 lines
1.1 KiB
Text
$NetBSD: patch-ab,v 1.6 2002/11/10 07:59:03 tron 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 @@
|
|
#include "memrange.h"
|
|
|
|
/* Pull in the cpuid values from locore.s */
|
|
+#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 @@
|
|
0,
|
|
seltrue, xf86mmap, 0};
|
|
|
|
+#if __NetBSD_Version__ >= 106080000
|
|
+MOD_DEV("xf86", "xf86ap", NULL, -1, &newdev, -1)
|
|
+#else
|
|
MOD_DEV("xf86", LM_DT_CHAR, -1, &newdev)
|
|
+#endif
|
|
|
|
char *xf86_major_version = "2";
|
|
char *xf86_minor_version = "0";
|
|
@@ -76,7 +86,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);
|
|
+ mem_range_softc.mr_desc = NULL;
|
|
+ }
|
|
break;
|
|
|
|
case LKM_E_STAT:
|