Skip to content

Commit

Permalink
Merge pull request #10496 from degano/pythia6_tmpnam_76X
Browse files Browse the repository at this point in the history
Fix warning raised by deprecated use of tmpnam.
  • Loading branch information
davidlange6 committed Aug 4, 2015
2 parents 535073c + a977166 commit b5da997
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion GeneratorInterface/Pythia6Interface/src/Pythia6Service.cc
Expand Up @@ -10,6 +10,7 @@
#include <boost/bind.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/filesystem.hpp>

#include "CLHEP/Random/RandomEngine.h"

Expand Down Expand Up @@ -385,7 +386,7 @@ void Pythia6Service::setSLHAFromHeader( const std::vector<std::string> &lines )
std::set<std::string> blocks;
unsigned int model = 0, subModel = 0;

const char *fname = std::tmpnam(NULL);
const char *fname = boost::filesystem::unique_path().c_str();
std::ofstream file(fname, std::fstream::out | std::fstream::trunc);
std::string block;
for(std::vector<std::string>::const_iterator iter = lines.begin();
Expand Down

0 comments on commit b5da997

Please sign in to comment.