Explorar el Código

package/fscryptctl: fix build with gcc 4.8

Fix the following build failure with gcc 4.8 raised since bump to
version 1.0.0 in commit ib832f6eb9d86920907c50901a99f13b44dd94647 and
https://github.com/google/fscryptctl/commit/9dba7224cbde07df25ba01146a2f6fb897bb9e56:

fscryptctl.c: In function 'string_to_mode':
fscryptctl.c:214:3: error: 'for' loop initial declarations are only allowed in C99 mode
   for (size_t i = 0; i < ARRAY_SIZE(mode_strings); i++) {
   ^

Fixes:
 - http://autobuild.buildroot.org/results/58e8facd9105dcdfbc21ed245de03f3162c98cc9

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Fabrice Fontaine hace 3 años
padre
commit
042399b93c
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      package/fscryptctl/fscryptctl.mk

+ 2 - 1
package/fscryptctl/fscryptctl.mk

@@ -10,7 +10,8 @@ FSCRYPTCTL_LICENSE = Apache-2.0
 FSCRYPTCTL_LICENSE_FILES = LICENSE
 
 define FSCRYPTCTL_BUILD_CMDS
-	$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) fscryptctl
+	$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
+		CFLAGS="$(TARGET_CFLAGS) -std=c99" fscryptctl
 endef
 
 define FSCRYPTCTL_INSTALL_TARGET_CMDS