Introduction
Introduction Statistics Contact Development Disclaimer Help
hostname.c - slstatus - status monitor
git clone git://git.suckless.org/slstatus
Log
Files
Refs
README
LICENSE
---
hostname.c (291B)
---
1 /* See LICENSE file for copyright and license details. */
2 #include <stdio.h>
3 #include <unistd.h>
4
5 #include "../slstatus.h"
6 #include "../util.h"
7
8 const char *
9 hostname(const char *unused)
10 {
11 if (gethostname(buf, sizeof(buf)) < 0) {
12 warn("gethostbyname:");
13 return NULL;
14 }
15
16 return buf;
17 }
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.