xref: /OK3568_Linux_fs/buildroot/package/tpm2-tools/0001-configure-make-build-gnu99.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From 521c3cc506b18c5c84d86e1e90d1daee39849b0c Mon Sep 17 00:00:00 2001
2From: William Roberts <william.c.roberts@intel.com>
3Date: Mon, 8 Feb 2021 11:57:28 -0600
4Subject: [PATCH] configure: make build gnu99
5
6Signed-off-by: William Roberts <william.c.roberts@intel.com>
7
8[Retrieved from:
9https://github.com/tpm2-software/tpm2-tools/commit/521c3cc506b18c5c84d86e1e90d1daee39849b0c
10and updated to set gnu99 instead of c99 as done by
11https://github.com/tpm2-software/tpm2-tools/commit/5d0267428e96989afce406d096994ec5091ee107]
12Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
13---
14 configure.ac | 3 +++
15 1 file changed, 3 insertions(+)
16
17diff --git a/configure.ac b/configure.ac
18index dc15b5595..25039a0d9 100644
19--- a/configure.ac
20+++ b/configure.ac
21@@ -287,6 +287,9 @@ AC_DEFUN([add_c_flag], [
22 # -D_GNU_SOURCE is required for execvpe() in options.c
23 add_c_flag([-D_GNU_SOURCE], [AC_MSG_ERROR([Cannot enable -D_GNU_SOURCE])])
24
25+# Enable gnu99 mode, since we use some of these features.
26+add_c_flag([-std=gnu99], [AC_MSG_ERROR([Cannot enable -std=gnu99])])
27+
28 # Best attempt compiler options that are on newer versions of GCC that
29 # we can't widely enforce without killing other peoples builds.
30 # Works with gcc only. Needs to be disabled on BSD and clang
31