Skip to contentSkip to conversation

ruby: fix build for nommu

PATCH New Gustavo Zacarias 2 participants 2 messages May 19, 2016 – May 23, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ruby: fix build for nommu

Fixes:
http://autobuild.buildroot.net/results/a8b/a8b5fe95bbc1b3cc23db828fbc80d815c88f18c2/

---
 ...-process.c-fix-rb_spawn_process-for-nommu.patch | 34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 package/ruby/0001-process.c-fix-rb_spawn_process-for-nommu.patch
package/ruby/0001-process.c-fix-rb_spawn_process-for-nommu.patch new file +34 -0
new file mode 100644
index 0000000..701c105
@@ -0,0 +1,34 @@
+From 24e6d5bcf791a5c3f46191e544731420ff8b1312 Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <[email protected]>
+Date: Thu, 19 May 2016 11:10:02 -0300
+Subject: [PATCH] process.c: fix rb_spawn_process() for nommu
+
+rb_spawn_process() in process.c tries different solutions for when fork
+and/or spawnv are/aren't available.
+The last resort when both aren't is to use the system() call which
+stores the value in the status variable, which isn't declared.
+
+Signed-off-by: Gustavo Zacarias <[email protected]>
+---
+Patch status: reported https://bugs.ruby-lang.org/issues/12398
+
+ process.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/process.c b/process.c
+index e196639..40967f7 100644
+--- a/process.c
++++ b/process.c
+@@ -3897,6 +3897,9 @@ rb_spawn_process(struct rb_execarg *eargp, char *errmsg, size_t errmsg_buflen)
+     VALUE prog;
+     struct rb_execarg sarg;
+ #endif
++#if !defined HAVE_WORKING_FORK || !USE_SPAWNV
++    int status;
++#endif
+ 
+ #if defined HAVE_WORKING_FORK && !USE_SPAWNV
+     pid = rb_fork_async_signal_safe(NULL, rb_exec_atfork, eargp, eargp->redirect_fds, errmsg, errmsg_buflen);
+-- 
+2.7.3
+
Signature · 1 line
2.7.3
#1 lore raw

PATCH 1/1 ruby: fix build for nommu

Hello,

package/ruby/0001-process.c-fix-rb_spawn_process-for-nommu.patch line 13

Quoted 10 lines · Gustavo Zacarias
package/ruby/0001-process.c-fix-rb_spawn_process-for-nommu.patch new file +10 -0
+Subject: [PATCH] process.c: fix rb_spawn_process() for nommu
+
+rb_spawn_process() in process.c tries different solutions for when fork
+and/or spawnv are/aren't available.
+The last resort when both aren't is to use the system() call which
+stores the value in the status variable, which isn't declared.
+
+Signed-off-by: Gustavo Zacarias <[email protected]>
+---
+Patch status: reported https://bugs.ruby-lang.org/issues/12398

The maintainer asked some questions there, and seemed to suggest that he might remove support for no-MMU platforms in the future.

In the mean time, patch applied to master.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com