Xinqi Bao's Git

Added LICENSE statements to all source files
[slstatus.git] / hostname.c
1 /* See LICENSE file for copyright and license details. */
2 #include <err.h>
3 #include <unistd.h>
4
5 #include "util.h"
6
7 const char *
8 hostname(void)
9 {
10 if (gethostname(buf, sizeof(buf)) == -1) {
11 warn("hostname");
12 return NULL;
13 }
14
15 return buf;
16 }