Author: imp
Date: Thu Aug 31 17:32:09 2017
New Revision: 323062
URL: https://svnweb.freebsd.org/changeset/base/323062

Log:
  Make efichar.c routines available to libefi.
  
  Make efichar.c routines available to libefi as well as
  libefivar. Define LIBEFI when building so we can conditionally include
  stand.h vs the normal userland stuff.

Modified:
  head/sys/boot/efi/libefi/Makefile
  head/sys/boot/efi/libefi/efichar.c

Modified: head/sys/boot/efi/libefi/Makefile
==============================================================================
--- head/sys/boot/efi/libefi/Makefile   Thu Aug 31 17:22:35 2017        
(r323061)
+++ head/sys/boot/efi/libefi/Makefile   Thu Aug 31 17:32:09 2017        
(r323062)
@@ -11,7 +11,7 @@ LIB=  efi
 INTERNALLIB=
 WARNS?=        2
 
-SRCS=  delay.c devpath.c efi_console.c efinet.c efipart.c env.c errno.c \
+SRCS=  delay.c devpath.c efi_console.c efichar.c efinet.c efipart.c env.c 
errno.c \
        handles.c wchar.c libefi.c efi_driver_utils.c efizfs.c devicename.c
 
 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
@@ -55,5 +55,7 @@ CFLAGS+= ${FORMAT_EXTENSIONS}
 .if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "aarch64"
 CFLAGS+= -DTERM_EMU
 .endif
+
+CFLAGS+= -DLIBEFI
 
 .include <bsd.lib.mk>

Modified: head/sys/boot/efi/libefi/efichar.c
==============================================================================
--- head/sys/boot/efi/libefi/efichar.c  Thu Aug 31 17:22:35 2017        
(r323061)
+++ head/sys/boot/efi/libefi/efichar.c  Thu Aug 31 17:32:09 2017        
(r323062)
@@ -29,10 +29,14 @@ __FBSDID("$FreeBSD$");
 
 #include <sys/types.h>
 #include <errno.h>
+#ifdef LIBEFI
+#include <stand.h>
+#else
 #include <stddef.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#endif
 #include <sys/efi.h>
 #include <machine/efi.h>
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to