From e0d207ea08a6ae4f4941c86e66dc71cc3b35e23c Mon Sep 17 00:00:00 2001 From: adri Date: Fri, 24 Jun 2022 16:16:06 +0200 Subject: [PATCH] Fixed username and os name (openbsd) --- uwufetch.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/uwufetch.c b/uwufetch.c index efcb80e..492a6e3 100644 --- a/uwufetch.c +++ b/uwufetch.c @@ -933,7 +933,11 @@ struct info get_info() #endif // _WIN32 // os version, cpu and board info +#ifdef __OPENBSD__ + FILE* os_release = popen("echo ID=openbsd", "r"); // os-release does not exist in OpenBSD +#else FILE* os_release = fopen("/etc/os-release", "r"); // os name file +#endif #ifndef __BSD__ FILE* cpuinfo = fopen("/proc/cpuinfo", "r"); // cpu name file for not-freebsd systems #else