Xinqi Bao's Git
projects
/
slstatus.git
/ blob
summary
|
log
|
commit
|
diff
|
tree
history
|
raw
|
HEAD
Rewrite Makefile to accomodate file split
[slstatus.git]
/
hostname.c
1
#include <err.h>
2
#include <unistd.h>
3
4
#include
"util.h"
5
6
const char
*
7
hostname
(
void
)
8
{
9
if
(
gethostname
(
buf
,
sizeof
(
buf
)) == -
1
) {
10
warn
(
"hostname"
);
11
return
NULL
;
12
}
13
14
return
buf
;
15
}