diff mbox

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

Message ID 1358510207-15045-2-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King Jan. 18, 2013, 11:56 a.m. UTC
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(+)

Comments

Keng-Yu Lin Jan. 21, 2013, 7:54 a.m. UTC | #1
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. UTC | #2
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>
diff mbox

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"