mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-03 03:41:04 +01:00
Global: Add support for Oracle Solaris (#2176)
* Fix Oracle Solaris zpool build * Add memrchr fallback * Change to include fron extern * add new line * remove ; in zpool.c * Change wrapper to macro Also change README.md * Tweaks --------- Co-authored-by: Carter Li <CarterLi@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
[](https://deepwiki.com/fastfetch-cli/fastfetch)
|
||||
[](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" />
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user