1
0
slstatus/components/hostname.c
Laslo Hunhold 7246dc4381
Move components into dedicated subdirectory
This brings us a lot more tidiness.
2017-09-24 17:20:27 +02:00

17 lines
246 B
C

/* See LICENSE file for copyright and license details. */
#include <err.h>
#include <unistd.h>
#include "../util.h"
const char *
hostname(void)
{
if (gethostname(buf, sizeof(buf)) == -1) {
warn("hostname");
return NULL;
}
return buf;
}