From: est31 Date: Fri, 17 Apr 2015 03:05:52 +0000 (+0200) Subject: Fix path detection with --std= parameter X-Git-Tag: 0.4.13~365 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4abb96fb546b5975c74ff2cc295255fe17126287;p=oweals%2Fminetest.git 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 --- 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 = "";