mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-25 21:57:47 +00:00
Fix compiling with new versions of efivar
Fixes https://github.com/fwupd/fwupd/issues/4181
This commit is contained in:
parent
c05494430e
commit
e74d38bfd3
@ -412,6 +412,11 @@ endif
|
|||||||
if build_standalone and get_option('plugin_uefi_capsule')
|
if build_standalone and get_option('plugin_uefi_capsule')
|
||||||
efiboot = dependency('efiboot')
|
efiboot = dependency('efiboot')
|
||||||
|
|
||||||
|
efivar = dependency('efivar')
|
||||||
|
if cc.has_header_symbol('efivar/efivar-types.h', 'efi_time_t', dependencies : efivar)
|
||||||
|
conf.set('HAVE_EFI_TIME_T', '1')
|
||||||
|
endif
|
||||||
|
|
||||||
efi_app_location = join_paths(libexecdir, 'fwupd', 'efi')
|
efi_app_location = join_paths(libexecdir, 'fwupd', 'efi')
|
||||||
conf.set_quoted('EFI_APP_LOCATION', efi_app_location)
|
conf.set_quoted('EFI_APP_LOCATION', efi_app_location)
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include <fwupdplugin.h>
|
#include <fwupdplugin.h>
|
||||||
|
|
||||||
|
#include <efivar/efivar.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#define EFI_CAPSULE_HEADER_FLAGS_PERSIST_ACROSS_RESET 0x00010000
|
#define EFI_CAPSULE_HEADER_FLAGS_PERSIST_ACROSS_RESET 0x00010000
|
||||||
@ -17,6 +18,7 @@
|
|||||||
|
|
||||||
#define EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED 0x0000000000000004ULL
|
#define EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED 0x0000000000000004ULL
|
||||||
|
|
||||||
|
#ifndef HAVE_EFI_TIME_T
|
||||||
typedef struct __attribute__((__packed__)) {
|
typedef struct __attribute__((__packed__)) {
|
||||||
guint16 year;
|
guint16 year;
|
||||||
guint8 month;
|
guint8 month;
|
||||||
@ -30,6 +32,7 @@ typedef struct __attribute__((__packed__)) {
|
|||||||
guint8 daylight;
|
guint8 daylight;
|
||||||
guint8 pad2;
|
guint8 pad2;
|
||||||
} efi_time_t;
|
} efi_time_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct __attribute__((__packed__)) {
|
typedef struct __attribute__((__packed__)) {
|
||||||
fwupd_guid_t guid;
|
fwupd_guid_t guid;
|
||||||
|
Loading…
Reference in New Issue
Block a user