Skip to contentSkip to conversation

netperf: set _FILE_OFFSET_BITS to 64 to support large files

PATCH Applied [email protected] 2 participants 2 messages Oct 9, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 netperf: set _FILE_OFFSET_BITS to 64 to support large files

From: Ting Liu <[email protected]>

Without this patch, netperf2.6 can only support files smaller than 2GB with TCP_SENDFILE item.

---
v2: update with Otavio's comment (add base_contains item)

 .../recipes-support/netperf/netperf_2.6.0.bb       |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
meta-networking/recipes-support/netperf/netperf_2.6.0.bb +5 -0
index eda7859..c206d56 100644
@@ -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() {
Signature · 1 line
1.7.3.4
#1 lore raw

Merged, thanks.

-J.

Quoted 30 lines · [[oe] [meta-oe][PATCH v2] netperf: set _FILE_OFFSET_BITS to 64 to support…

From: Ting Liu <[email protected]>

Without this patch, netperf2.6 can only support files smaller than 2GB with TCP_SENDFILE item.

---
v2: update with Otavio's comment (add base_contains item)

 .../recipes-support/netperf/netperf_2.6.0.bb       |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
meta-networking/recipes-support/netperf/netperf_2.6.0.bb +5 -0
index eda7859..c206d56 100644
@@ -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() {
Signature · 2 lines
-Joe MacDonald.
:wq