blob: 83d1cbbfe071883e6834de7e1e7d08482afe0c11 [file] [log] [blame]
Andrew Geisslere34f8962021-04-15 15:53:51 -05001From 9456f2f779d3ed4a134d55571d8bec78ad3b28c1 Mon Sep 17 00:00:00 2001
Brad Bishopd7bf8c12018-02-25 22:55:05 -05002From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 6 Jun 2017 07:37:20 -0700
Andrew Geisslere34f8962021-04-15 15:53:51 -05004Subject: [PATCH 4/6] Define __SWORD_TYPE if not defined by libc
Brad Bishopd7bf8c12018-02-25 22:55:05 -05005
6__SWORD_TYPE is internal to glibc, therefore
7check and define it if needed e.g. on musl
8
9Upstream-Status: Pending
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 src/lib/src/fwts_uefi.c | 4 ++++
14 1 file changed, 4 insertions(+)
15
16diff --git a/src/lib/src/fwts_uefi.c b/src/lib/src/fwts_uefi.c
Andrew Geisslere34f8962021-04-15 15:53:51 -050017index 138f1164..13d9e36c 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050018--- a/src/lib/src/fwts_uefi.c
19+++ b/src/lib/src/fwts_uefi.c
Andrew Geisslere34f8962021-04-15 15:53:51 -050020@@ -63,6 +63,10 @@ typedef struct {
Brad Bishopd7bf8c12018-02-25 22:55:05 -050021 #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 Geisslere34f8962021-04-15 15:53:51 -050031--
322.25.1
33