On Mon, Oct 02, 2017 at 09:44:36AM +0200, O. Hartmann wrote:
> Am Mon, 2 Oct 2017 11:35:22 +0700
> "Alex V. Petrov" <alexvpet...@gmail.com> schrieb:
> 
> > revision 324186
> > In file included from /usr/obj/usr/src/tmp/usr/include/sys/efi.h:33:
> > /usr/obj/usr/src/tmp/usr/include/machine/efi.h:35:10: fatal error:
> > 'isa/rtc.h' file not found
> 
> Me, too here.
> 

I am only starting the build, but I believe that the following patch should
give the fix.


diff --git a/sys/amd64/include/efi.h b/sys/amd64/include/efi.h
index 75d39592e28..eaea8d03276 100644
--- a/sys/amd64/include/efi.h
+++ b/sys/amd64/include/efi.h
@@ -32,8 +32,6 @@
 #ifndef __AMD64_INCLUDE_EFI_H_
 #define __AMD64_INCLUDE_EFI_H_
 
-#include <isa/rtc.h>
-
 /*
  * XXX: from gcc 6.2 manual:
  * Note, the ms_abi attribute for Microsoft Windows 64-bit targets
@@ -47,8 +45,12 @@
 #define        EFIABI_ATTR     __attribute__((ms_abi))
 #endif
 
+#ifdef _KERNEL
+#include <isa/rtc.h>
+
 #define        EFI_TIME_LOCK()         mtx_lock(&atrtc_time_lock);
 #define        EFI_TIME_UNLOCK()       mtx_unlock(&atrtc_time_lock);
 #define        EFI_TIME_OWNED()        mtx_assert(&atrtc_time_lock, MA_OWNED);
+#endif
 
 #endif /* __AMD64_INCLUDE_EFI_H_ */
_______________________________________________
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to