Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Avoid undefined reference to `hyperv_guid_v...



details:   https://anonhg.NetBSD.org/src/rev/26af07391055
branches:  trunk
changeset: 451662:26af07391055
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Thu May 30 11:15:29 2019 +0000

description:
Avoid undefined reference to `hyperv_guid_video' without vmbus(4).

diffstat:

 sys/arch/x86/x86/hyperv.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (54 lines):

diff -r 9f5622a95c11 -r 26af07391055 sys/arch/x86/x86/hyperv.c
--- a/sys/arch/x86/x86/hyperv.c Thu May 30 07:37:17 2019 +0000
+++ b/sys/arch/x86/x86/hyperv.c Thu May 30 11:15:29 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hyperv.c,v 1.2 2019/05/24 14:28:48 nonaka Exp $        */
+/*     $NetBSD: hyperv.c,v 1.3 2019/05/30 11:15:29 nonaka Exp $        */
 
 /*-
  * Copyright (c) 2009-2012,2016-2017 Microsoft Corp.
@@ -33,7 +33,7 @@
  */
 #include <sys/cdefs.h>
 #ifdef __KERNEL_RCSID
-__KERNEL_RCSID(0, "$NetBSD: hyperv.c,v 1.2 2019/05/24 14:28:48 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hyperv.c,v 1.3 2019/05/30 11:15:29 nonaka Exp $");
 #endif
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: head/sys/dev/hyperv/vmbus/hyperv.c 331757 2018-03-30 02:25:12Z emaste $");
@@ -43,6 +43,7 @@
 #include "lapic.h"
 #include "genfb.h"
 #include "opt_ddb.h"
+#include "vmbus.h"
 #include "wsdisplay.h"
 #endif
 
@@ -988,6 +989,7 @@
        return rv;
 }
 
+#if NVMBUS > 0
 /*
  * genfb at vmbus
  */
@@ -1086,10 +1088,12 @@
        }
 #endif
 }
+#endif
 
 device_t
 device_hyperv_register(device_t dev, void *aux)
 {
+#if NVMBUS > 0
        device_t parent = device_parent(dev);
 
        if (parent && device_is_a(parent, "vmbus") && !x86_found_console) {
@@ -1128,5 +1132,6 @@
                        return NULL;
                }
        }
+#endif
        return NULL;
 }



Home | Main Index | Thread Index | Old Index