summaryrefslogtreecommitdiff
path: root/src/porting.cpp
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-04-17 05:05:52 +0200
committerest31 <MTest31@outlook.com>2015-04-17 05:12:06 +0200
commit4abb96fb546b5975c74ff2cc295255fe17126287 (patch)
treef7a96538381cae3278647106f0111b2afff46fcf /src/porting.cpp
parentb318c4712c1b84e2c3d71396095ea0f3df0d209d (diff)
downloadminetest-4abb96fb546b5975c74ff2cc295255fe17126287.tar.gz
minetest-4abb96fb546b5975c74ff2cc295255fe17126287.tar.bz2
minetest-4abb96fb546b5975c74ff2cc295255fe17126287.zip
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
Diffstat (limited to 'src/porting.cpp')
-rw-r--r--src/porting.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/porting.cpp b/src/porting.cpp
index 86d5bf5da..812f148da 100644
--- a/src/porting.cpp
+++ b/src/porting.cpp
@@ -369,7 +369,7 @@ void initializePaths()
/*
Linux
*/
- #elif defined(linux)
+ #elif defined(linux) || defined(__linux)
char buf[BUFSIZ];
memset(buf, 0, BUFSIZ);
@@ -465,7 +465,7 @@ void initializePaths()
/*
Linux
*/
- #elif defined(linux)
+ #elif defined(linux) || defined(__linux)
// Get path to executable
std::string bindir = "";