util/cbfstool/compiler: __attribute redefinition
In Windows Cygwin enviroment, compiler reports redefinition error at cbfstool/ifwitool.c on _packed and __aligned. Skip new defines when vales are already defined. Change-Id: I3af3c6b8fc57eee345afcef2f871b897138f78ce Signed-off-by: Frans Hendriks <fhendriks@eltan.com> Reviewed-on: https://review.coreboot.org/27357 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
8889e0106d
commit
69a835d311
|
@ -2,6 +2,7 @@
|
||||||
* This file is part of the coreboot project.
|
* This file is part of the coreboot project.
|
||||||
*
|
*
|
||||||
* Copyright 2017 Google Inc.
|
* Copyright 2017 Google Inc.
|
||||||
|
* Copyright (c) 2017-2018 Eltan B.V.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -18,14 +19,18 @@
|
||||||
|
|
||||||
#if !defined(__FreeBSD__)
|
#if !defined(__FreeBSD__)
|
||||||
|
|
||||||
|
#if !defined(__packed)
|
||||||
#if defined(__WIN32) || defined(__WIN64)
|
#if defined(__WIN32) || defined(__WIN64)
|
||||||
#define __packed __attribute__((gcc_struct, packed))
|
#define __packed __attribute__((gcc_struct, packed))
|
||||||
#else
|
#else
|
||||||
#define __packed __attribute__((packed))
|
#define __packed __attribute__((packed))
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(__aligned)
|
||||||
#define __aligned(x) __attribute__((aligned(x)))
|
#define __aligned(x) __attribute__((aligned(x)))
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#define __always_unused __attribute__((unused))
|
#define __always_unused __attribute__((unused))
|
||||||
#define __must_check __attribute__((warn_unused_result))
|
#define __must_check __attribute__((warn_unused_result))
|
||||||
|
|
Loading…
Reference in New Issue