commit - 3c2618948ed7e2d9482424bfa110ca14a3420ef8
commit + 1c6e3bba12887eb116f03ff72477cb1c0494cfc5
blob - 620b41937d24c48796a0c6a4ef14b188cd41a952
blob + e74ce3c022e6dd4e7bb289685f2e5ca36ef7a1ba
--- slock/config.h
+++ slock/config.h
/* user and group to drop privileges to */
static const char *user = "nobody";
+
+#ifdef __linux__
+static const char *group = "nobody";
+#else
static const char *group = "nogroup";
+#endif
static const char *colorname[NUMCOLS] = {
[INIT] = "black", /* after initialization */
blob - 7128e4a90889b606e8f538e19f35fba71006e16e
blob + c6757ed8a677dfa035922bdd76ef88a1225e4ff3
--- slock/slock.c
+++ slock/slock.c
/* See LICENSE file for license details. */
#ifdef __FreeBSD__
# define __BSD_VISIBLE 1
+# define HAVE_BSD_AUTH 1
#endif
-#define _XOPEN_SOURCE 500
+#ifdef __linux__
+# define HAVE_SHADOW_H 1
+#endif
+
#if HAVE_SHADOW_H
-#include <shadow.h>
+# include <shadow.h>
#endif
+#include <stdnoreturn.h>
#include <ctype.h>
#include <errno.h>
#include <grp.h>
#include <X11/Xutil.h>
#if HAVE_BSD_AUTH
-#include <login_cap.h>
-#include <bsd_auth.h>
+# include <login_cap.h>
+# include <bsd_auth.h>
#endif
/*POSIX threading for auto-timeout*/
#include "config.h"
-static void
+static noreturn void
die(const char *errstr, ...)
{
va_list ap;