whereami icon indicating copy to clipboard operation
whereami copied to clipboard

solaris fix

Open tkoecker opened this issue 4 years ago • 0 comments

This patch fixes the Solaris support (tested on Solaris 10 and 11).

While the existing getExecutablePath() code works fine on Solaris the getModulePath() does not work. The code assumes that the /proc/self/map file on Solaris has the same syntax as the /proc/self/maps file on Linux. This is not the case, actually the /proc/self/map is even a binary file, see: https://docs.oracle.com/cd/E19253-01/816-5174/proc-4/index.html The dladdr() based code that is already used for other platforms in whereami however works fine on Solaris too. I added another copy of it (there is already is more than one) - this maybe could be merged.

tkoecker avatar Nov 19 '21 09:11 tkoecker