Skip to content

Commit

Permalink
Fix path detection with --std= parameter
Browse files Browse the repository at this point in the history
Fixes path detection when compilers have been told to follow a standard, e.g. with -DCMAKE_CXX_FLAGS=--std=c++98.
To see the passed defines, try this with and without the --std parameter:
gcc -E -dM --std=c99 - < /dev/null | grep linux
  • Loading branch information
est31 committed Apr 17, 2015
1 parent b318c47 commit 4abb96f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/porting.cpp
Expand Up @@ -369,7 +369,7 @@ void initializePaths()
/*
Linux
*/
#elif defined(linux)
#elif defined(linux) || defined(__linux)

char buf[BUFSIZ];
memset(buf, 0, BUFSIZ);
Expand Down Expand Up @@ -465,7 +465,7 @@ void initializePaths()
/*
Linux
*/
#elif defined(linux)
#elif defined(linux) || defined(__linux)

// Get path to executable
std::string bindir = "";
Expand Down

0 comments on commit 4abb96f

Please sign in to comment.