Andrew Geissler | e34f896 | 2021-04-15 15:53:51 -0500 | [diff] [blame] | 1 | From 9456f2f779d3ed4a134d55571d8bec78ad3b28c1 Mon Sep 17 00:00:00 2001 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Tue, 6 Jun 2017 07:37:20 -0700 |
Andrew Geissler | e34f896 | 2021-04-15 15:53:51 -0500 | [diff] [blame] | 4 | Subject: [PATCH 4/6] Define __SWORD_TYPE if not defined by libc |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 5 | |
| 6 | __SWORD_TYPE is internal to glibc, therefore |
| 7 | check and define it if needed e.g. on musl |
| 8 | |
| 9 | Upstream-Status: Pending |
| 10 | |
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 12 | --- |
| 13 | src/lib/src/fwts_uefi.c | 4 ++++ |
| 14 | 1 file changed, 4 insertions(+) |
| 15 | |
| 16 | diff --git a/src/lib/src/fwts_uefi.c b/src/lib/src/fwts_uefi.c |
Andrew Geissler | e34f896 | 2021-04-15 15:53:51 -0500 | [diff] [blame] | 17 | index 138f1164..13d9e36c 100644 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 18 | --- a/src/lib/src/fwts_uefi.c |
| 19 | +++ b/src/lib/src/fwts_uefi.c |
Andrew Geissler | e34f896 | 2021-04-15 15:53:51 -0500 | [diff] [blame] | 20 | @@ -63,6 +63,10 @@ typedef struct { |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 21 | #define UEFI_IFACE_SYSFS (2) /* sysfs */ |
| 22 | #define UEFI_IFACE_EFIVARS (3) /* efivar fs */ |
| 23 | |
| 24 | +#ifndef __SWORD_TYPE |
| 25 | +typedef __typeof__( ((struct statfs *)0)->f_type ) __SWORD_TYPE; |
| 26 | +#endif |
| 27 | + |
| 28 | /* File system magic numbers */ |
| 29 | #define PSTOREFS_MAGIC ((__SWORD_TYPE)0x6165676C) |
| 30 | #define EFIVARFS_MAGIC ((__SWORD_TYPE)0xde5e81e4) |
Andrew Geissler | e34f896 | 2021-04-15 15:53:51 -0500 | [diff] [blame] | 31 | -- |
| 32 | 2.25.1 |
| 33 | |