mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-08 01:10:23 +00:00
windows: no utsname.h
This commit is contained in:
parent
c5398e09e1
commit
9066876ee0
@ -9,10 +9,11 @@
|
||||
#include <sys/types.h>
|
||||
#if defined(__linux__) || defined(__gnu_hurd__)
|
||||
#include <sys/sysinfo.h>
|
||||
#include <sys/utsname.h>
|
||||
#elif !defined(__MINGW64__)
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
#include <sys/utsname.h>
|
||||
#endif
|
||||
#include <notcurses/direct.h>
|
||||
#include <notcurses/notcurses.h>
|
||||
#include "ncart.h"
|
||||
@ -326,6 +327,7 @@ typedef enum {
|
||||
|
||||
static ncneo_kernel_e
|
||||
get_kernel(fetched_info* fi){
|
||||
#ifndef __MINGW64__
|
||||
struct utsname uts;
|
||||
if(uname(&uts)){
|
||||
fprintf(stderr, "Failure invoking uname (%s)\n", strerror(errno));
|
||||
@ -343,6 +345,9 @@ get_kernel(fetched_info* fi){
|
||||
return NCNEO_XNU;
|
||||
}
|
||||
fprintf(stderr, "Unknown operating system via uname: %s\n", uts.sysname);
|
||||
#else
|
||||
(void)fi;
|
||||
#endif
|
||||
return NCNEO_UNKNOWN;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user