Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1115,6 +1115,7 @@ elseif(SunOS)
src/detection/displayserver/linux/xcb.c
src/detection/displayserver/linux/xlib.c
src/detection/font/font_linux.c
src/common/solaris/memrchr.c
src/detection/gpu/gpu_sunos.c
src/detection/gpu/gpu_pci.c
src/detection/gtk_qt/gtk.c
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/fastfetch-cli/fastfetch)
[![中文README](https://img.shields.io/badge/%E4%B8%AD%E6%96%87-README-red)](README-cn.md)

Fastfetch is a [neofetch](https://github.com/dylanaraps/neofetch)-like tool for fetching system information and displaying it in a visually appealing way. It is written mainly in C, with a focus on performance and customizability. Currently, it supports Linux, macOS, Windows 7+, Android, FreeBSD, OpenBSD, NetBSD, DragonFly, Haiku, and illumos (SunOS).
Fastfetch is a [neofetch](https://github.com/dylanaraps/neofetch)-like tool for fetching system information and displaying it in a visually appealing way. It is written mainly in C, with a focus on performance and customizability. Currently, it supports Linux, macOS, Windows 7+, Android, FreeBSD, OpenBSD, NetBSD, DragonFly, Haiku, illumos (SunOS), and Solaris.

<img src="screenshots/example1.png" width="49%" align="left" />
<img src="https://upload.wikimedia.org/wikipedia/commons/2/24/Transparent_Square_Tiles_Texture.png" width="49%" height="16px" align="left" />
Expand Down
15 changes: 15 additions & 0 deletions src/common/solaris/memrchr.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#if defined(__sun) && ! defined(__illumos__)
#include "memrchr.h"

void *memrchr(const void *s, int c, size_t n)
{
if(n == 0) return NULL;
const unsigned char *p = (const unsigned char *)s + n;
while (n--) {
if (*(--p) == (unsigned char) c)
return (void*) p;
}

return NULL;
}
#endif
6 changes: 6 additions & 0 deletions src/common/solaris/memrchr.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#pragma once
#include <stddef.h>

#if defined(__sun) && !defined(__illumos__)
void *memrchr(const void *s, int c, size_t n);
#endif
4 changes: 4 additions & 0 deletions src/detection/gpu/gpu_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
#define FF_STR_INDIR(x) #x
#define FF_STR(x) FF_STR_INDIR(x)

#if defined(__sun) && ! defined(__illumos__)
#include "common/solaris/memrchr.h"
#endif

static const FFstrbuf* loadPciIds()
{
static FFstrbuf pciids;
Expand Down
5 changes: 5 additions & 0 deletions src/detection/zpool/zpool.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

#ifdef __sun
#include <libzfs.h>
#ifndef __illumos__
// On Solaris 11, zpool_get_prop has only 5 arguments. #2173
#define ffzpool_get_prop(zhp, prop, buf, len, srctype, literal) \
ffzpool_get_prop(zhp, prop, buf, len, srctype)
#endif
#else
#include "libzfs_simplified.h"
#endif
Expand Down