mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 17:41:41 +01:00
Fix build errors
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
static const char* parseEnv()
|
||||
{
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#include "packages.h"
|
||||
#include "common/parsing.h"
|
||||
|
||||
#include <dirent.h>
|
||||
|
||||
static uint32_t getNumElements(const char* dirname, unsigned char type)
|
||||
{
|
||||
@@ -28,17 +31,17 @@ static uint32_t countBrewPackages(const char* dirname)
|
||||
ffStrbufInitS(&baseDir, dirname);
|
||||
|
||||
uint32_t result = 0;
|
||||
uint32_t baseDirLength = baseDir->length;
|
||||
uint32_t baseDirLength = baseDir.length;
|
||||
|
||||
ffStrbufAppendS(baseDir, "/Caskroom");
|
||||
result += getNumElements(baseDir->chars, DT_DIR);
|
||||
ffStrbufSubstrBefore(baseDir, baseDirLength);
|
||||
ffStrbufAppendS(&baseDir, "/Caskroom");
|
||||
result += getNumElements(baseDir.chars, DT_DIR);
|
||||
ffStrbufSubstrBefore(&baseDir, baseDirLength);
|
||||
|
||||
ffStrbufAppendS(baseDir, "/Cellar");
|
||||
result += getNumElements(baseDir->chars, DT_DIR);
|
||||
ffStrbufSubstrBefore(baseDir, baseDirLength);
|
||||
ffStrbufAppendS(&baseDir, "/Cellar");
|
||||
result += getNumElements(baseDir.chars, DT_DIR);
|
||||
ffStrbufSubstrBefore(&baseDir, baseDirLength);
|
||||
|
||||
ffStrbufDestroy(baseDir);
|
||||
ffStrbufDestroy(&baseDir);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
#include "packages.h"
|
||||
#include "common/io.h"
|
||||
#include "common/parsing.h"
|
||||
#include "common/processing.h"
|
||||
#include "common/properties.h"
|
||||
#include "common/settings.h"
|
||||
#include "common/processing.h"
|
||||
#include "common/parsing.h"
|
||||
#include "detection/os/os.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
static uint32_t getNumElementsImpl(const char* dirname, unsigned char type)
|
||||
{
|
||||
|
||||
@@ -31,8 +31,8 @@ void ffDetectPackagesImpl(const FFinstance* instance, FFPackagesResult* result)
|
||||
|
||||
FFstrbuf scoopPath;
|
||||
ffStrbufInitF(&scoopPath, "%s/scoop/apps/*", getenv("USERPROFILE"));
|
||||
counts->scoop = getNumElements(scoopPath.chars, FILE_ATTRIBUTE_DIRECTORY);
|
||||
if(counts->scoop > 0)
|
||||
counts->scoop-- // scoop
|
||||
result->scoop = getNumElements(scoopPath.chars, FILE_ATTRIBUTE_DIRECTORY);
|
||||
if(result->scoop > 0)
|
||||
result->scoop-- // scoop
|
||||
ffStrbufDestroy(&scoopPath);
|
||||
}
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
#include "detection/terminalshell/terminalshell.h"
|
||||
#include "common/io.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef FF_HAVE_FREETYPE
|
||||
#include "common/library.h"
|
||||
#include <ft2build.h>
|
||||
|
||||
Reference in New Issue
Block a user