|
|
38cfe28 |
From a9ad43032acfcd8c69cd8ca651b532fac9d28847 Mon Sep 17 00:00:00 2001
|
|
|
38cfe28 |
From: Peter Jones <pjones@redhat.com>
|
|
|
38cfe28 |
Date: Wed, 19 Feb 2020 09:57:44 -0500
|
|
|
38cfe28 |
Subject: [PATCH 86/86] Make declaring efi_time_t conditional on
|
|
|
38cfe28 |
EFIVAR_NO_EFI_TIME_T
|
|
|
38cfe28 |
|
|
|
38cfe28 |
This allows you to turn off declaration of efi_time_t and related
|
|
|
38cfe28 |
functions in the case where it's declared someplace else, such as in
|
|
|
38cfe28 |
some local code or another library's headers.
|
|
|
38cfe28 |
|
|
|
38cfe28 |
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
38cfe28 |
---
|
|
|
38cfe28 |
src/include/efivar/efivar-time.h | 6 +++++-
|
|
|
38cfe28 |
src/include/efivar/efivar-types.h | 2 ++
|
|
|
38cfe28 |
2 files changed, 7 insertions(+), 1 deletion(-)
|
|
|
38cfe28 |
|
|
|
38cfe28 |
diff --git a/src/include/efivar/efivar-time.h b/src/include/efivar/efivar-time.h
|
|
|
38cfe28 |
index 04c243601f5..ebe2a703ed4 100644
|
|
|
38cfe28 |
--- a/src/include/efivar/efivar-time.h
|
|
|
38cfe28 |
+++ b/src/include/efivar/efivar-time.h
|
|
|
38cfe28 |
@@ -4,8 +4,12 @@
|
|
|
38cfe28 |
* Copyright 2020 Peter Jones <pjones@redhat.com>
|
|
|
38cfe28 |
*/
|
|
|
38cfe28 |
|
|
|
38cfe28 |
+#if defined(EFIVAR_NO_EFI_TIME_T) && EFIVAR_NO_EFI_TIME_T && !defined(EFIVAR_TIME_H_)
|
|
|
38cfe28 |
+#define EFIVAR_TIME_H_ 1
|
|
|
38cfe28 |
+#endif
|
|
|
38cfe28 |
+
|
|
|
38cfe28 |
#ifndef EFIVAR_TIME_H_
|
|
|
38cfe28 |
-#define EFIVAR_TIME_H_
|
|
|
38cfe28 |
+#define EFIVAR_TIME_H_ 1
|
|
|
38cfe28 |
|
|
|
38cfe28 |
#include <stdbool.h>
|
|
|
38cfe28 |
|
|
|
38cfe28 |
diff --git a/src/include/efivar/efivar-types.h b/src/include/efivar/efivar-types.h
|
|
|
38cfe28 |
index ce22b6c12b3..ebba511b17b 100644
|
|
|
38cfe28 |
--- a/src/include/efivar/efivar-types.h
|
|
|
38cfe28 |
+++ b/src/include/efivar/efivar-types.h
|
|
|
38cfe28 |
@@ -51,6 +51,7 @@ typedef uint16_t efi_char16_t;
|
|
|
38cfe28 |
typedef unsigned long uintn_t;
|
|
|
38cfe28 |
typedef long intn_t;
|
|
|
38cfe28 |
|
|
|
38cfe28 |
+#if !defined(EFIVAR_NO_EFI_TIME_T) || EFIVAR_NO_EFI_TIME_T
|
|
|
38cfe28 |
#define EFIVAR_HAVE_EFI_TIME_T 1
|
|
|
38cfe28 |
|
|
|
38cfe28 |
/*
|
|
|
38cfe28 |
@@ -83,6 +84,7 @@ typedef struct {
|
|
|
38cfe28 |
#define EFI_TIME_IN_DAYLIGHT ((uint8_t)0x02)
|
|
|
38cfe28 |
|
|
|
38cfe28 |
#define EFI_UNSPECIFIED_TIMEZONE ((uint16_t)0x07ff)
|
|
|
38cfe28 |
+#endif /* !defined(EFIVAR_NO_EFI_TIME_T) || EFIVAR_NO_EFI_TIME_T */
|
|
|
38cfe28 |
|
|
|
38cfe28 |
#define EFI_VARIABLE_NON_VOLATILE ((uint64_t)0x0000000000000001)
|
|
|
38cfe28 |
#define EFI_VARIABLE_BOOTSERVICE_ACCESS ((uint64_t)0x0000000000000002)
|
|
|
38cfe28 |
--
|
|
|
38cfe28 |
2.24.1
|
|
|
38cfe28 |
|