Use getexecname() on Solaris (GH #)

This commit is contained in:
Jeffrey Walton 2019-01-02 19:46:00 -05:00
parent 60ffc2ec01
commit 748ebe6328
No known key found for this signature in database
GPG Key ID: B36AB348921B1838

View File

@ -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)