all repos — slstatus @ c12b9cc50b5f476cd7b1de1dbd49e6282b1a042f

my build of slstatus (tools.suckless.org/slstatus/)

components/kernel_release.c

/* See LICENSE file for copyright and license details. */
#include <errno.h>
#include <sys/utsname.h>
#include <stdio.h>
#include <string.h>

#include "../util.h"

const char *
kernel_release(void)
{
	struct utsname udata;

	if (uname(&udata) < 0) {
		warn("uname:");
		return NULL;
	}

	return bprintf("%s", udata.release);
}