canonicalize_file_name() is a GNU-extension.

Replaced with call to realpath() to build on non-Linux systems, such as Mac OSX.
This commit is contained in:
Pete Johns 2010-12-26 14:11:05 +11:00
parent ecad249ae2
commit 7943d8ce53
1 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@
#ifndef _WIN32 // POSIX-style system
#include <glob.h>
#include <unistd.h>
#include <stdlib.h> // canonicalize_file_name
#include <stdlib.h>
#endif
#ifndef _WIN32
@ -58,7 +58,7 @@ void FileListerUnix::recursiveAddFiles2(std::vector<std::string> &relative,
if (filename[filename.length()-1] != '/')
{
// File
char * const fname = canonicalize_file_name(filename.c_str());
char* const fname = realpath(filename.c_str(), NULL);
if (!fname)
continue;