Skip to content

Check for linux/openat2.h availability #3657

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

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion src/test/openat2.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "util.h"

#include <fcntl.h> /* Definition of O_* and S_* constants */
#include <linux/openat2.h> /* Definition of RESOLVE_* constants */
#include <sys/syscall.h> /* Definition of SYS_* constants */
#include <unistd.h>
#include <errno.h>
Expand Down
8 changes: 8 additions & 0 deletions src/test/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,14 @@ static inline uintptr_t unbufferable_syscall(uintptr_t syscall, uintptr_t arg1,
#define RR_KCMP_FILE 0
#define RR_KCMP_FILES 2

/* Old systems don't have linux/openat2.h */
struct open_how {
__u64 flags;
__u64 mode;
__u64 resolve;
};
#define RESOLVE_BENEATH 0x08

/* Old systems don't have these */
#ifndef TIOCGPKT
#define TIOCGPKT _IOR('T', 0x38, int)
Expand Down