Fastfetch: make it compile on SunOS

This commit is contained in:
Carter Li
2024-06-16 01:02:48 +08:00
parent 5539fecb99
commit d35490aeef
26 changed files with 241 additions and 8 deletions
+3 -1
View File
@@ -34,6 +34,8 @@ static void getExePath(FFPlatform* platform)
exePathLen = 0;
else
exePathLen--; // remove terminating NUL
#else
int exePathLen = 0;
#endif
if (exePathLen > 0)
{
@@ -181,7 +183,7 @@ void ffPlatformInitImpl(FFPlatform* platform)
struct passwd* pwd = getpwuid(getuid());
struct utsname uts;
if(uname(&uts) != 0)
if(uname(&uts) < 0)
memset(&uts, 0, sizeof(uts));
getExePath(platform);