diff --git a/src/OSspecific/Unix/printStack.C b/src/OSspecific/Unix/printStack.C index a5bf67cf61..f7433063de 100644 --- a/src/OSspecific/Unix/printStack.C +++ b/src/OSspecific/Unix/printStack.C @@ -32,7 +32,9 @@ License #include "readHexLabel.H" #include +#ifndef darwin #include +#endif #include // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -65,7 +67,7 @@ string pOpen(const string &cmd, label line=0) { string str(buffer); return str.substr(0, str.size()-1); - } + } } pclose(cmdPipe); } @@ -93,9 +95,9 @@ void printSourceFileAndLine void *addr; sscanf(myAddress.c_str(), "%p",&addr); - + Dl_info info; - + dladdr(addr, &info); unsigned long offset = ulong(info.dli_fbase); @@ -216,7 +218,7 @@ void error::printStack(Ostream& os) { string::size_type lPos = msg.find('['); string::size_type rPos = msg.find(']'); - + if (lPos != string::npos && rPos != string::npos && lPos