Blame SOURCES/0003-Build-with-fshort-wchar-so-toggle-passwords-work-rig.patch

670361
From 9eb111a7f7b897ba4ae19a68708e010a5c384260 Mon Sep 17 00:00:00 2001
670361
From: Peter Jones <pjones@redhat.com>
670361
Date: Fri, 19 Jun 2015 16:53:36 -0400
670361
Subject: [PATCH 03/10] Build with -fshort-wchar so toggle passwords work
670361
 right.
670361
670361
This source tree uses:
670361
670361
typedef wchar_t efi_char16_t;
670361
670361
to define UEFI's UCS-2 character type.  On many platforms, wchar_t is
670361
32-bits by default.  As a result, efichar_from_char winds up writing
670361
4-byte characters instead of 2-byte characters.  In the case where we
670361
hash the password in mokutil, this works fine, because the same datatype
670361
is used, and the values are the same.  But for our feature toggles,
670361
where we store the raw data and shim is interpretting the character
670361
array, every other character winds up being L'\0', and verification
670361
fails.
670361
670361
So always build with -fshort-wchar to ensure we get 2-byte character
670361
storage.
670361
670361
Signed-off-by: Peter Jones <pjones@redhat.com>
670361
---
670361
 configure.ac | 2 +-
670361
 1 file changed, 1 insertion(+), 1 deletion(-)
670361
670361
diff --git a/configure.ac b/configure.ac
670361
index fe28fb92241..69d412ac633 100644
670361
--- a/configure.ac
670361
+++ b/configure.ac
670361
@@ -37,7 +37,7 @@ else
670361
 	default_strict=no
670361
 fi
670361
 
670361
-WARNINGFLAGS_C="$WARNINGFLAGS_C -std=gnu11"
670361
+WARNINGFLAGS_C="$WARNINGFLAGS_C -std=gnu11 -fshort-wchar"
670361
 
670361
 AC_ARG_ENABLE(strict, AS_HELP_STRING([--enable-strict],[Enable strict compilation options]), enable_strict=$enableval,
670361
 		enable_strict=$default_strict)
670361
-- 
670361
2.17.1
670361