aboutsummaryrefslogtreecommitdiffstats
path: root/main/zsnes/zsnes-1.51-depbuild.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/zsnes/zsnes-1.51-depbuild.patch')
-rw-r--r--main/zsnes/zsnes-1.51-depbuild.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/main/zsnes/zsnes-1.51-depbuild.patch b/main/zsnes/zsnes-1.51-depbuild.patch
new file mode 100644
index 0000000000..e2cc0d86f6
--- /dev/null
+++ b/main/zsnes/zsnes-1.51-depbuild.patch
@@ -0,0 +1,34 @@
+--- a/src/tools/depbuild.cpp Fri Nov 13 18:41:24 2009
++++ b/src/tools/depbuild.cpp Fri Nov 13 19:04:09 2009
+@@ -24,6 +24,9 @@
+ #include <iostream>
+ #include <string>
+ #include <cstdio>
++#include <cstdlib>
++#include <unistd.h>
++
+ using namespace std;
+
+ #include "fileutil.h"
+@@ -130,7 +133,20 @@
+ void dependency_calculate_asm(const char *filename)
+ {
+ string command = nasm + " " + nflags + " -M " + filename;
+- system(command.c_str());
++ FILE *fp = popen(command.c_str(), "r");
++ if (fp)
++ {
++ char line[256];
++ while (fgets(line, sizeof(line), fp)) //Process all lines of output
++ {
++ cout << line;
++ }
++ pclose(fp);
++ }
++ else
++ {
++ cerr << "Failed on: " << filename << "\n";
++ }
+ }
+
+ void dependency_calculate_psr(const char *filename)