[oe-commits] Chris Larson : netperf: apply patch to fall back from fork to vfork

git version control git at git.openembedded.org
Wed Jan 19 00:32:09 UTC 2011


Module: openembedded.git
Branch: master
Commit: e4193a20d7aba7fb5de102f63a588365366cc306
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=e4193a20d7aba7fb5de102f63a588365366cc306

Author: Chris Larson <chris_larson at mentor.com>
Date:   Tue Jan 18 12:03:04 2011 -0700

netperf: apply patch to fall back from fork to vfork

Patch courtesy Freescale.

Signed-off-by: Chris Larson <chris_larson at mentor.com>

---

 recipes/netperf/files/vfork.patch |   28 ++++++++++++++++++++++++++++
 recipes/netperf/netperf_2.4.4.bb  |    3 ++-
 2 files changed, 30 insertions(+), 1 deletions(-)

diff --git a/recipes/netperf/files/vfork.patch b/recipes/netperf/files/vfork.patch
new file mode 100755
index 0000000..adbe8c6
--- /dev/null
+++ b/recipes/netperf/files/vfork.patch
@@ -0,0 +1,28 @@
+diff --exclude CVS -uNr netperf-2.4.3/src/netserver.c netperf-2.4.3.modified/src/netserver.c
+--- netperf-2.4.3/src/netserver.c	2007-02-15 18:22:40.000000000 -0700
++++ netperf-2.4.3.modified/src/netserver.c	2007-12-05 11:42:25.000000000 -0700
+@@ -567,7 +567,11 @@
+   fflush (stdin);
+   fflush (stdout);
+   fflush (stderr);
++#if defined(HAVE_FORK)
+   switch (fork())
++#else
++  switch (vfork())
++#endif
+     {
+     case -1:
+       perror("netperf server error");
+@@ -711,8 +715,11 @@
+		}
+ #else
+       signal(SIGCLD, SIG_IGN);
+-
++#if defined(HAVE_FORK)
+	  switch (fork())
++#else
++	  switch (vfork())
++#endif
+	    {
+	    case -1:
+	      /* something went wrong */
diff --git a/recipes/netperf/netperf_2.4.4.bb b/recipes/netperf/netperf_2.4.4.bb
index 8a3e159..783cd55 100644
--- a/recipes/netperf/netperf_2.4.4.bb
+++ b/recipes/netperf/netperf_2.4.4.bb
@@ -2,10 +2,11 @@ DESCRIPTION="Network performance benchmark including tests for TCP, UDP, sockets
 SECTION = "console/network"
 HOMEPAGE = "http://www.netperf.org/"
 LICENSE = "netperf"
-PR = "r1"
+PR = "r2"
 
 SRC_URI="ftp://ftp.netperf.org/netperf/archive/netperf-${PV}.tar.bz2 \
          file://cpu_set.patch \
+         file://vfork.patch \
          file://init"
 
 inherit update-rc.d autotools





More information about the Openembedded-commits mailing list