mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 10:24:58 +02:00
Netif (DragonFly): use code of OpenBSD
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ Features:
|
||||
* Improve accuracy of HDR support on Windows 11 24H2 (Display, Windows)
|
||||
* Improve performance of SSID detection on macOS Sequoia (Wifi, macOS, #1597)
|
||||
* Support warp terminal version detection on Windows (Terminal, Windows)
|
||||
* Support default route detection for OpenBSD (LocalIP, OpenBSD)
|
||||
* Support default route detection on OpenBSD & DragonFly BSD (LocalIP, OpenBSD / DragonFly)
|
||||
|
||||
Logo:
|
||||
* Add Common Torizon OS
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#ifdef __OpenBSD__
|
||||
#if defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
# define ROUNDUP(a) ROUNDUP2((a), sizeof(int))
|
||||
#elif defined(__NetBSD__)
|
||||
# define ROUNDUP(a) ROUNDUP2((a), sizeof(uint64_t))
|
||||
#elif defined(__FreeBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
# define ROUNDUP(a) ROUNDUP2((a), sizeof(int))
|
||||
#elif defined(__OpenBSD__)
|
||||
# define ROUNDUP(a) ROUNDUP2((a), sizeof(int))
|
||||
@@ -52,7 +52,7 @@ get_rt_address(struct rt_msghdr *rtm, int desired)
|
||||
|
||||
bool ffNetifGetDefaultRouteImpl(char iface[IF_NAMESIZE + 1], uint32_t* ifIndex)
|
||||
{
|
||||
#if defined(__OpenBSD__)
|
||||
#if defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
int mib[6] = {CTL_NET, PF_ROUTE, 0, AF_INET, NET_RT_FLAGS, RTF_GATEWAY};
|
||||
size_t needed;
|
||||
|
||||
|
||||
@@ -525,7 +525,7 @@ void ffInitLocalIpOptions(FFLocalIpOptions* options)
|
||||
ffOptionInitModuleArg(&options->moduleArgs, "");
|
||||
|
||||
options->showType = FF_LOCALIP_TYPE_IPV4_BIT | FF_LOCALIP_TYPE_PREFIX_LEN_BIT
|
||||
#if !__ANDROID__ /*Permission denied*/ && !__DragonFly__ /*Doesn't work*/
|
||||
#if !__ANDROID__ /*Permission denied*/
|
||||
| FF_LOCALIP_TYPE_DEFAULT_ROUTE_ONLY_BIT
|
||||
#endif
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user