netperf: set _FILE_OFFSET_BITS to 64 to support large files
authorTing Liu <b28495@freescale.com>
Wed, 9 Oct 2013 08:32:29 +0000 (16:32 +0800)
committerPatrick Ohly <patrick.ohly@intel.com>
Fri, 9 Jan 2015 16:33:44 +0000 (08:33 -0800)
Without this patch, netperf2.6 can only
support files smaller than 2GB with TCP_SENDFILE item.

(From meta-openembedded rev: d79d4b340358168d7ca4b8f2837c9d09c44bd1fe)

Signed-off-by: Ting Liu <b28495@freescale.com>
Tested-by: Jianhua Xie<jianhua.xie@freescale.com>
Reviewed-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Joe MacDonald <joe@deserted.net>
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
meta-openembedded/meta-networking/recipes-support/netperf/netperf_2.6.0.bb

index eda7859..c206d56 100644 (file)
@@ -23,6 +23,11 @@ S = "${WORKDIR}/netperf-${PV}"
 # cpu_set.patch plus _GNU_SOURCE makes src/netlib.c compile with CPU_ macros
 CFLAGS_append = " -DDO_UNIX -DDO_IPV6 -D_GNU_SOURCE"
 
+# set the "_FILE_OFFSET_BITS" preprocessor symbol to 64 to support files
+# larger than 2GB
+CFLAGS_append = "${@base_contains('DISTRO_FEATURES', 'largefile', \
+    ' -D_FILE_OFFSET_BITS=64', '', d)}"
+
 # autotools.bbclass attends to include m4 files with path depth <= 2 by
 # "find ${S} -maxdepth 2 -name \*.m4", so move m4 files from m4/m4.
 do_configure_prepend() {