Skip to content

Commit

Permalink
filemap: define PROC_SUPER_MAGIC, avoid linux/magic.h
Browse files Browse the repository at this point in the history
PR #1848 caused build issues with some "unusual" build configurations
– apparently we can't rely on linux/magic.h being present when
cross-building for musl libc.

Defining PROC_SUPER_MAGIC should not cause a problems since it should
be considered part of the Linux kernel/user API and it is unlikely to
change.
  • Loading branch information
hillu committed Sep 5, 2024
1 parent 79954d3 commit 509fc7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libyara/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ YR_API int yr_filemap_map_fd(

#ifdef __linux__
#include <sys/vfs.h>
#include <linux/magic.h>
#define PROC_SUPER_MAGIC 0x9fa0
#endif

#define MAP_EXTRA_FLAGS 0
Expand Down

0 comments on commit 509fc7c

Please sign in to comment.