package/infozip: silent LFS warning
authorRomain Naour <romain.naour@openwide.fr>
Sat, 24 Jan 2015 15:23:44 +0000 (16:23 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 5 Feb 2015 21:49:27 +0000 (22:49 +0100)
infozip already defines _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE in
some sources files when LARGE_FILE_SUPPORT is set.
Remove them from CFLAGS.

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/infozip/infozip.mk

index 3e8058fa6a19c1a68e0cfa80d139b6944578e085..e57f7e16d040fbb879f5197246b147a7907435a0 100644 (file)
@@ -21,9 +21,14 @@ INFOZIP_CFLAGS = -I. -DUNIX
 # removed since it can't work for cross-compilation.
 INFOZIP_CFLAGS += -DUIDGID_NOT_16BIT
 
+# infozip already defines _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE when
+# necessary, redefining it on the command line causes some warnings.
+INFOZIP_TARGET_CFLAGS = \
+       $(filter-out -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE,$(TARGET_CFLAGS))
+
 define INFOZIP_BUILD_CMDS
        $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
-               CFLAGS="$(TARGET_CFLAGS) $(INFOZIP_CFLAGS)" \
+               CFLAGS="$(INFOZIP_TARGET_CFLAGS) $(INFOZIP_CFLAGS)" \
                AS="$(TARGET_CC) -c" \
                -f unix/Makefile generic
 endef