mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 13:25:45 +02:00
lib: add Uname, a constructor for utsname
Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
7f67f55746
commit
5d7e815eb4
14
include/crucible/uname.h
Normal file
14
include/crucible/uname.h
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#ifndef CRUCIBLE_UNAME_H
|
||||||
|
#define CRUCIBLE_UNAME_H
|
||||||
|
|
||||||
|
#include <sys/utsname.h>
|
||||||
|
|
||||||
|
namespace crucible {
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
struct Uname : public utsname {
|
||||||
|
Uname();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -19,6 +19,7 @@ CRUCIBLE_OBJS = \
|
|||||||
string.o \
|
string.o \
|
||||||
task.o \
|
task.o \
|
||||||
time.o \
|
time.o \
|
||||||
|
uname.o \
|
||||||
|
|
||||||
include ../makeflags
|
include ../makeflags
|
||||||
-include ../localconf
|
-include ../localconf
|
||||||
|
11
lib/uname.cc
Normal file
11
lib/uname.cc
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "crucible/error.h"
|
||||||
|
#include "crucible/uname.h"
|
||||||
|
|
||||||
|
namespace crucible {
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
Uname::Uname()
|
||||||
|
{
|
||||||
|
DIE_IF_NON_ZERO(uname(static_cast<utsname*>(this)));
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user