mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 17:41:41 +01:00
Global: fix build on Windows
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#include "common/processing.h"
|
||||
#include "util/stringUtils.h"
|
||||
#include "util/path.h"
|
||||
#include "util/linux/elf.h"
|
||||
#include "util/binary.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -92,11 +92,11 @@ const char* ffDetectEditor(FFEditorResult* result)
|
||||
|
||||
#if __linux__ || __FreeBSD__
|
||||
if (ffStrbufEqualS(&result->exe, "nvim"))
|
||||
ffElfExtractStrings(buf, extractNvimVersion, &result->version);
|
||||
ffBinaryExtractStrings(buf, extractNvimVersion, &result->version);
|
||||
else if (ffStrbufEqualS(&result->exe, "vim"))
|
||||
ffElfExtractStrings(buf, extractVimVersion, &result->version);
|
||||
ffBinaryExtractStrings(buf, extractVimVersion, &result->version);
|
||||
else if (ffStrbufEqualS(&result->exe, "nano"))
|
||||
ffElfExtractStrings(buf, extractNanoVersion, &result->version);
|
||||
ffBinaryExtractStrings(buf, extractNanoVersion, &result->version);
|
||||
|
||||
if (result->version.length > 0) return NULL;
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "initsystem.h"
|
||||
#include "common/processing.h"
|
||||
#include "util/linux/elf.h"
|
||||
#include "util/binary.h"
|
||||
#include <unistd.h>
|
||||
|
||||
FF_MAYBE_UNUSED static bool elfExtractStringsCallBack(const char* str, uint32_t len, void* data)
|
||||
@@ -49,7 +49,7 @@ const char* ffDetectInitSystem(FFInitSystemResult* result)
|
||||
#if __linux__ && !__ANDROID__
|
||||
if (ffStrbufEqualS(&result->name, "systemd"))
|
||||
{
|
||||
ffElfExtractStrings(result->exe.chars, elfExtractStringsCallBack, &result->version);
|
||||
ffBinaryExtractStrings(result->exe.chars, elfExtractStringsCallBack, &result->version);
|
||||
if (result->version.length == 0)
|
||||
{
|
||||
if (ffProcessAppendStdOut(&result->version, (char* const[]) {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "detection/displayserver/displayserver.h"
|
||||
#include "util/mallocHelper.h"
|
||||
#include "util/stringUtils.h"
|
||||
#include "util/linux/elf.h"
|
||||
#include "util/binary.h"
|
||||
|
||||
static const char* getSystemMonospaceFont(void)
|
||||
{
|
||||
@@ -315,7 +315,7 @@ static void detectSt(FFTerminalFontResult* terminalFont, const FFTerminalResult*
|
||||
{
|
||||
ffStrbufClear(&font);
|
||||
|
||||
const char* error = ffElfExtractStrings(terminal->exePath.chars, elfExtractStringsCallBack, &font);
|
||||
const char* error = ffBinaryExtractStrings(terminal->exePath.chars, elfExtractStringsCallBack, &font);
|
||||
if (error)
|
||||
{
|
||||
ffStrbufAppendS(&terminalFont->error, error);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "common/processing.h"
|
||||
#include "common/properties.h"
|
||||
#include "util/stringUtils.h"
|
||||
#include "util/linux/elf.h"
|
||||
#include "util/binary.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#ifdef __FreeBSD__
|
||||
@@ -265,7 +265,7 @@ FF_MAYBE_UNUSED static bool getTerminalVersionGnome(FFstrbuf* exe, FFstrbuf* ver
|
||||
{
|
||||
if (exe->chars[0] == '/')
|
||||
{
|
||||
ffElfExtractStrings(exe->chars, extractGnomeTerminalVersion, version);
|
||||
ffBinaryExtractStrings(exe->chars, extractGnomeTerminalVersion, version);
|
||||
if (version->length) return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user