mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-13 20:44:35 +03:00
Fix include file ordering of generic headers
This commit is contained in:
@ -9,6 +9,7 @@ in the source distribution for its full text.
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
void Generic_hostname(char* buffer, size_t size);
|
||||
|
||||
#endif
|
||||
|
@ -9,6 +9,7 @@ in the source distribution for its full text.
|
||||
|
||||
#include "zfs/ZfsArcStats.h"
|
||||
|
||||
|
||||
void openzfs_sysctl_init(ZfsArcStats* stats);
|
||||
|
||||
void openzfs_sysctl_updateArcStats(ZfsArcStats* stats);
|
||||
|
@ -61,18 +61,19 @@ static void parseOSRelease(char* buffer, size_t bufferLen) {
|
||||
|
||||
snprintf(buffer, bufferLen, "%s%s%s", name[0] ? name : "", name[0] && version[0] ? " " : "", version);
|
||||
}
|
||||
|
||||
|
||||
char* Generic_uname(void) {
|
||||
static char savedString[
|
||||
/* uname structure fields - manpages recommend sizeof */
|
||||
sizeof(uname_info.sysname) +
|
||||
sizeof(uname_info.release) +
|
||||
sizeof(uname_info.machine) +
|
||||
sizeof(((struct utsname*)0)->sysname) +
|
||||
sizeof(((struct utsname*)0)->release) +
|
||||
sizeof(((struct utsname*)0)->machine) +
|
||||
16/*markup*/ +
|
||||
128/*distro*/] = {'\0'};
|
||||
static bool loaded_data = false;
|
||||
|
||||
if (!loaded_data) {
|
||||
struct utsname uname_info;
|
||||
int uname_result = uname(&uname_info);
|
||||
|
||||
char distro[128];
|
||||
|
Reference in New Issue
Block a user