From ab212633d46e71cce0d8ba982628e685f447ab0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vesa=20J=C3=A4=C3=A4skel=C3=A4inen?= Date: Sat, 9 Mar 2019 22:44:21 +0200 Subject: [PATCH] Fix compilation without EFI being enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If EFI is disabled compilation can fail with: ../src/login/logind-dbus.c: In function ‘property_get_reboot_to_boot_loader_entry’: ../src/login/logind-dbus.c:2772:29: error: implicit declaration of function ‘efi_loader_entry_name_valid’; did you mean ‘efi_loader_get_features’? [-Werror=implicit-function-declaration] } else if (!efi_loader_entry_name_valid(v)) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~ efi_loader_get_features ../src/login/logind-dbus.c:2772:29: warning: nested extern declaration of ‘efi_loader_entry_name_valid’ [-Wnested-externs] This adds stub for efi_loader_entry_name_valid() to enable compilation. --- src/shared/efivars.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/shared/efivars.h b/src/shared/efivars.h index 92670c82c7..a545cd47b4 100644 --- a/src/shared/efivars.h +++ b/src/shared/efivars.h @@ -132,6 +132,10 @@ static inline int efi_loader_get_entries(char ***ret) { return -EOPNOTSUPP; } +static inline bool efi_loader_entry_name_valid(const char *s) { + return false; +} + static inline int efi_loader_get_features(uint64_t *ret) { return -EOPNOTSUPP; }