File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,8 @@ static int syscall_memfd_secret(void) {
80
80
int fd = -1 ;
81
81
#ifdef __NR_memfd_secret
82
82
// SYS_memfd_secret is supported since Linux 5.14
83
- fd = syscall (SYS_memfd_secret , 0 );
83
+ // not using SYS_memfd_secret as SLES does not define it
84
+ fd = syscall (__NR_memfd_secret , 0 );
84
85
if (fd == -1 ) {
85
86
LOG_PERR ("memfd_secret() failed" );
86
87
}
@@ -95,7 +96,8 @@ static int syscall_memfd_create(void) {
95
96
int fd = -1 ;
96
97
#ifdef __NR_memfd_create
97
98
// SYS_memfd_create is supported since Linux 3.17, glibc 2.27
98
- fd = syscall (SYS_memfd_create , "anon_fd_name" , 0 );
99
+ // not using SYS_memfd_create for consistency with syscall_memfd_secret
100
+ fd = syscall (__NR_memfd_create , "anon_fd_name" , 0 );
99
101
if (fd == -1 ) {
100
102
LOG_PERR ("memfd_create() failed" );
101
103
}
You can’t perform that action at this time.
0 commit comments