Xinqi Bao's Git

Fix missing config.h in Makefile
[slstatus.git] / kernel_release.c
1 /* See LICENSE file for copyright and license details. */
2 #include <sys/utsname.h>
3 #include <stdio.h>
4
5 #include "util.h"
6
7 const char *
8 kernel_release(void)
9 {
10 struct utsname udata;
11
12 if (uname(&udata) < 0) {
13 return NULL;
14 }
15
16 return bprintf("%s", udata.release);
17 }