Commit d7d79c6b authored by Colin Walters's avatar Colin Walters

build: Allow being built if linux/securebits.h isn't available

For some reason the RHEL6 kernel-headers package doesn't have it.

Let's just follow for now the cargo culting of "define defines ourself
if not available" that various kernel-tied utilities have because
various buildsystems are too shitty to make it easy to install newer
kernel headers even if you're running an old kernel.
parent 56c31509
......@@ -22,6 +22,10 @@ AC_SUBST(WARN_CFLAGS)
LT_PREREQ([2.2.4])
LT_INIT([disable-static])
AC_CHECK_HEADER([linux/securebits.h],
[AC_DEFINE([HAVE_LINUX_SECUREBITS_H], [1],
[Define to 1 if we have securebits.h])])
AC_PATH_PROG([XSLTPROC], [xsltproc])
AM_CONDITIONAL(HAVE_XSLTPROC, test x"$XSLTPROC" != x)
......
......@@ -37,8 +37,13 @@
#include <sys/mount.h>
#include <sys/syscall.h>
#include <sys/wait.h>
#include <linux/securebits.h>
#include <sched.h>
#ifdef HAVE_LINUX_SECUREBITS_H
#include <linux/securebits.h>
#else
#define SECBIT_NOROOT (1 << 0)
#define SECBIT_NOROOT_LOCKED (1 << 1)
#endif
static void fatal (const char *message, ...) __attribute__ ((noreturn)) __attribute__ ((format (printf, 1, 2)));
static void fatal_errno (const char *message) __attribute__ ((noreturn));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment