Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filemap: define PROC_SUPER_MAGIC, avoid linux/magic.h #2103

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion libyara/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,12 @@ YR_API int yr_filemap_map_fd(

#ifdef __linux__
#include <sys/vfs.h>
#include <linux/magic.h>
// This constant can be found in linux/magic.h and the statfs(2) manpage.
//
// We don't want to include linux/magic.h here because it may not be
// available in cross-build environments, see
// https://github.com/Hugal31/yara-rust/issues/115
#define PROC_SUPER_MAGIC 0x9fa0
#endif

#define MAP_EXTRA_FLAGS 0
Expand Down
Loading