From 748ebe63283099ca5a70202804ceeb6f83ca63ca Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Wed, 2 Jan 2019 19:46:00 -0500 Subject: [PATCH] Use getexecname() on Solaris (GH #) --- test.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test.cpp b/test.cpp index 3f5d1ee1..319aa21d 100644 --- a/test.cpp +++ b/test.cpp @@ -155,6 +155,8 @@ int scoped_main(int argc, char *argv[]) #if defined(AT_EXECFN) if (getauxval(AT_EXECFN)) g_argvPathHint = getauxval(AT_EXECFN); +#elif defined(sun) || defined(__sun) + g_argvPathHint = getexecname(); #endif std::string::size_type pos = g_argvPathHint.find_last_of("\\/"); if (pos != std::string::npos)