]> git.tdb.fi Git - builder.git/blobdiff - source/externalaction.cpp
Adjust requires to library changes
[builder.git] / source / externalaction.cpp
index 97f6c619f426cb16e50cef20aa170e2008b86ea7..de799e4c550877e91927d8b85bcd5596d2b9b3f0 100644 (file)
@@ -1,6 +1,5 @@
 #include <sys/wait.h>
 #include <iostream>
-#include <msp/iter.h>
 #include "builder.h"
 #include "externalaction.h"
 
@@ -14,7 +13,7 @@ int ExternalAction::check()
                signal_done.emit();
                return 0;
        }
-       
+
        if(!pid)
                return exit_code;
 
@@ -48,7 +47,7 @@ void ExternalAction::launch()
                }
                cout<<'\n';
        }
-       
+
        if(builder.get_dry_run())
                pid=-1;
        else
@@ -57,9 +56,12 @@ void ExternalAction::launch()
                if(pid==0)
                {
                        char *argv_[argv.size()+1];
-                       for(CountingIterator<string, StringList::iterator> i=argv.begin(); i!=argv.end(); ++i)
-                               argv_[i.count()]=strdup(i->c_str());
-                       argv_[argv.size()]=0;
+
+                       unsigned j=0;
+                       for(StringList::iterator i=argv.begin(); i!=argv.end(); ++i)
+                               argv_[j++]=strdup(i->c_str());
+                       argv_[j]=0;
+
                        execvp(argv_[0], argv_);
                        cout<<"Couldn't execute "<<argv.front()<<'\n';
                        exit(1);