diff mbox series

[1/1] package/libva: fix build with gcc 4.8

Message ID 20240304161953.3529614-1-fontaine.fabrice@gmail.com
State Accepted
Headers show
Series [1/1] package/libva: fix build with gcc 4.8 | expand

Commit Message

Fabrice Fontaine March 4, 2024, 4:19 p.m. UTC
Fix the following build failure with gcc 4.8 raised since bump to
version 2.20.0 in commit e926c83928e08c0ecd6cd4383e1cca151a8a4d2c and
https://github.com/intel/libva/commit/4f5a4345fc9f92565763ca22026891475e3cf835:

../va/va.c: In function 'va_new_opendriver':
../va/va.c:695:9: error: 'for' loop initial declarations are only allowed in C99 mode
         for (unsigned int i = 0; i < num_drivers; i++)
         ^
../va/va.c:695:9: note: use option -std=c99 or -std=gnu99 to compile your code

Fixes: e926c83928e08c0ecd6cd4383e1cca151a8a4d2c
 - http://autobuild.buildroot.org/results/b9dbd104fa05c59883d87f74e6522c55620a4252

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/libva/libva.mk | 1 +
 1 file changed, 1 insertion(+)

Comments

Peter Korsgaard March 4, 2024, 9:49 p.m. UTC | #1
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fix the following build failure with gcc 4.8 raised since bump to
 > version 2.20.0 in commit e926c83928e08c0ecd6cd4383e1cca151a8a4d2c and
 > https://github.com/intel/libva/commit/4f5a4345fc9f92565763ca22026891475e3cf835:

 > ../va/va.c: In function 'va_new_opendriver':
 > ../va/va.c:695:9: error: 'for' loop initial declarations are only allowed in C99 mode
 >          for (unsigned int i = 0; i < num_drivers; i++)
 >          ^
 > ../va/va.c:695:9: note: use option -std=c99 or -std=gnu99 to compile your code

 > Fixes: e926c83928e08c0ecd6cd4383e1cca151a8a4d2c
 >  - http://autobuild.buildroot.org/results/b9dbd104fa05c59883d87f74e6522c55620a4252

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed, thanks.
Peter Korsgaard March 19, 2024, 4:34 p.m. UTC | #2
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fix the following build failure with gcc 4.8 raised since bump to
 > version 2.20.0 in commit e926c83928e08c0ecd6cd4383e1cca151a8a4d2c and
 > https://github.com/intel/libva/commit/4f5a4345fc9f92565763ca22026891475e3cf835:

 > ../va/va.c: In function 'va_new_opendriver':
 > ../va/va.c:695:9: error: 'for' loop initial declarations are only allowed in C99 mode
 >          for (unsigned int i = 0; i < num_drivers; i++)
 >          ^
 > ../va/va.c:695:9: note: use option -std=c99 or -std=gnu99 to compile your code

 > Fixes: e926c83928e08c0ecd6cd4383e1cca151a8a4d2c
 >  - http://autobuild.buildroot.org/results/b9dbd104fa05c59883d87f74e6522c55620a4252

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2023.11.x, thanks.
diff mbox series

Patch

diff --git a/package/libva/libva.mk b/package/libva/libva.mk
index 9e9d5d698c..4481be9e7b 100644
--- a/package/libva/libva.mk
+++ b/package/libva/libva.mk
@@ -10,6 +10,7 @@  LIBVA_LICENSE = MIT
 LIBVA_LICENSE_FILES = COPYING
 LIBVA_INSTALL_STAGING = YES
 LIBVA_DEPENDENCIES = host-pkgconf libdrm
+LIBVA_CFLAGS = $(TARGET_CFLAGS) -std=gnu99
 
 # libdrm is a hard-dependency
 LIBVA_CONF_OPTS = \