SELinuxMeter: hardcode SELINUX_MAGIC value

Avoid <linux/magic.h> include, not found by musl-gcc.
The value of SELINUX_MAGIC should really never change.
This commit is contained in:
Christian Göttsche 2020-12-17 16:53:59 +01:00
parent e6d536dd3f
commit 960f52b783
1 changed files with 1 additions and 2 deletions

View File

@ -12,7 +12,6 @@ in the source distribution for its full text.
#include <stdbool.h>
#include <stdio.h>
#include <unistd.h>
#include <linux/magic.h>
#include <sys/statfs.h>
#include <sys/statvfs.h>
@ -35,7 +34,7 @@ static bool hasSELinuxMount(void) {
return false;
}
if ((uint32_t)sfbuf.f_type != (uint32_t)SELINUX_MAGIC) {
if ((uint32_t)sfbuf.f_type != /* SELINUX_MAGIC */ 0xf97cff8cU) {
return false;
}