Skip to content

Commit

Permalink
Don't rely on linux/openat2.h
Browse files Browse the repository at this point in the history
Fixes #3655
  • Loading branch information
multun committed Nov 30, 2023
1 parent 36a71dc commit e7ff357
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
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

0 comments on commit e7ff357

Please sign in to comment.