Skip to content

Commit 4abb96f

Browse files
committedApr 17, 2015
Fix path detection with --std= parameter
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
1 parent b318c47 commit 4abb96f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

Diff for: ‎src/porting.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ void initializePaths()
369369
/*
370370
Linux
371371
*/
372-
#elif defined(linux)
372+
#elif defined(linux) || defined(__linux)
373373

374374
char buf[BUFSIZ];
375375
memset(buf, 0, BUFSIZ);
@@ -465,7 +465,7 @@ void initializePaths()
465465
/*
466466
Linux
467467
*/
468-
#elif defined(linux)
468+
#elif defined(linux) || defined(__linux)
469469

470470
// Get path to executable
471471
std::string bindir = "";

0 commit comments

Comments
 (0)
Please sign in to comment.