From 9456f2f779d3ed4a134d55571d8bec78ad3b28c1 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 6 Jun 2017 07:37:20 -0700
Subject: [PATCH 4/6] Define __SWORD_TYPE if not defined by libc

__SWORD_TYPE is internal to glibc, therefore
check and define it if needed e.g. on musl

Upstream-Status: Pending

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/lib/src/fwts_uefi.c | 4 ++++
 1 file changed, 4 insertions(+)

--- a/src/lib/src/fwts_uefi.c
+++ b/src/lib/src/fwts_uefi.c
@@ -63,6 +63,10 @@ typedef struct {
 #define UEFI_IFACE_SYSFS		(2)	/* sysfs */
 #define UEFI_IFACE_EFIVARS		(3)	/* efivar fs */
 
+#ifndef __SWORD_TYPE
+typedef __typeof__( ((struct statfs *)0)->f_type )	__SWORD_TYPE;
+#endif
+
 /* File system magic numbers */
 #define PSTOREFS_MAGIC          ((__SWORD_TYPE)0x6165676C)
 #define EFIVARFS_MAGIC          ((__SWORD_TYPE)0xde5e81e4)
