Patchwork [1/2] lib: fwts_uefi: fix build error when using gcc 4.6.3

login
register
mail settings
Submitter Colin King
Date Jan. 18, 2013, 11:56 a.m.
Message ID <1358510207-15045-2-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/213584/
State Accepted
Headers show

Comments

Colin King - Jan. 18, 2013, 11:56 a.m.
From: Colin Ian King <colin.king@canonical.com>

With older versions of gcc we get a build failure:

fwts_uefi.c: In function 'fwts_uefi_print_status_info':
fwts_uefi.c:469:2: error: expected ')' before 'PRIx64'
fwts_uefi.c:469:2: error: spurious trailing '%' in format [-Werror=format]

..because some required headers were left out.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/lib/src/fwts_uefi.c | 2 ++
 1 file changed, 2 insertions(+)
Keng-Yu Lin - Jan. 21, 2013, 7:54 a.m.
On Fri, Jan 18, 2013 at 7:56 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> With older versions of gcc we get a build failure:
>
> fwts_uefi.c: In function 'fwts_uefi_print_status_info':
> fwts_uefi.c:469:2: error: expected ')' before 'PRIx64'
> fwts_uefi.c:469:2: error: spurious trailing '%' in format [-Werror=format]
>
> ..because some required headers were left out.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/lib/src/fwts_uefi.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/lib/src/fwts_uefi.c b/src/lib/src/fwts_uefi.c
> index 8cfa321..c4435e6 100644
> --- a/src/lib/src/fwts_uefi.c
> +++ b/src/lib/src/fwts_uefi.c
> @@ -25,6 +25,8 @@
>  #include <fcntl.h>
>  #include <unistd.h>
>  #include <dirent.h>
> +#include <stdint.h>
> +#include <inttypes.h>
>
>  #include "fwts.h"
>  #include "fwts_uefi.h"
> --
> 1.8.0
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Ivan Hu - Jan. 21, 2013, 4:22 p.m.
On 01/18/2013 07:56 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> With older versions of gcc we get a build failure:
>
> fwts_uefi.c: In function 'fwts_uefi_print_status_info':
> fwts_uefi.c:469:2: error: expected ')' before 'PRIx64'
> fwts_uefi.c:469:2: error: spurious trailing '%' in format [-Werror=format]
>
> ..because some required headers were left out.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/lib/src/fwts_uefi.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/src/lib/src/fwts_uefi.c b/src/lib/src/fwts_uefi.c
> index 8cfa321..c4435e6 100644
> --- a/src/lib/src/fwts_uefi.c
> +++ b/src/lib/src/fwts_uefi.c
> @@ -25,6 +25,8 @@
>   #include <fcntl.h>
>   #include <unistd.h>
>   #include <dirent.h>
> +#include <stdint.h>
> +#include <inttypes.h>
>
>   #include "fwts.h"
>   #include "fwts_uefi.h"
>

Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch

diff --git a/src/lib/src/fwts_uefi.c b/src/lib/src/fwts_uefi.c
index 8cfa321..c4435e6 100644
--- a/src/lib/src/fwts_uefi.c
+++ b/src/lib/src/fwts_uefi.c
@@ -25,6 +25,8 @@ 
 #include <fcntl.h>
 #include <unistd.h>
 #include <dirent.h>
+#include <stdint.h>
+#include <inttypes.h>
 
 #include "fwts.h"
 #include "fwts_uefi.h"