git: adce5eaab9a9 - stable/14 - loader.efi: Fix LOADER_NET_SUPPORT=no builds

From: Warner Losh <imp_at_FreeBSD.org>
Date: Mon, 04 Nov 2024 04:58:24 UTC
The branch stable/14 has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=adce5eaab9a975655cd846c9841551ed8f89207a

commit adce5eaab9a975655cd846c9841551ed8f89207a
Author:     Tatiana <t.ermakova@securitycode.ru>
AuthorDate: 2024-11-02 22:13:58 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-11-04 00:51:25 +0000

    loader.efi: Fix LOADER_NET_SUPPORT=no builds
    
    We include too many references to networking things in the
    non-networking build for loader.efi. Ifdef out netserver command when we
    are disabling network support to resolve.
    
    PR: 277528
    MFC After: 2 days
    Reviewed by: imp
    
    (cherry picked from commit 47ef2a131091508e049ab10cad7f91a3c1342cd9)
---
 stand/efi/loader/main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c
index 324150f7c8c7..61bfe7a4d673 100644
--- a/stand/efi/loader/main.c
+++ b/stand/efi/loader/main.c
@@ -1755,6 +1755,7 @@ command_chain(int argc, char *argv[])
 
 COMMAND_SET(chain, "chain", "chain load file", command_chain);
 
+#if defined(LOADER_NET_SUPPORT)
 extern struct in_addr servip;
 static int
 command_netserver(int argc, char *argv[])
@@ -1785,3 +1786,4 @@ command_netserver(int argc, char *argv[])
 
 COMMAND_SET(netserver, "netserver", "change or display netserver URI",
     command_netserver);
+#endif