forked from includeos/IncludeOS
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
musl 1.2.5: stub missing syscalls, add time64 versions for 32bit
- stub faccessat, faccessat2, fchmodat2, pwritev2, preadv2, statx - include time64 versions of calls to time functions. As it looks like IncludeOS is already using 64 bit time on 32 bit, the *_time64 calls just redirect to the existing calls. On 64 bit systems there should be no change, as the regular calls are 64 bit.
- Loading branch information
Showing
8 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include "common.hpp" | ||
#include <sys/stat.h> | ||
#include <fcntl.h> | ||
|
||
static long sys_faccessat(int /*fd*/, const char* /*path*/, mode_t, int /*flag*/) | ||
{ | ||
// TODO Same as access(), but path is relative to fd | ||
return -EROFS; | ||
} | ||
|
||
extern "C" | ||
long syscall_SYS_faccessat(int fd, const char *path, mode_t mode, int flag) { | ||
return strace(sys_faccessat, "faccessat", fd, path, mode, flag); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include "common.hpp" | ||
#include <sys/stat.h> | ||
#include <fcntl.h> | ||
|
||
static long sys_faccessat2(int /*fd*/, const char* /*path*/, mode_t, int /*flag*/) | ||
{ | ||
// TODO Same as access(), but path is relative to fd | ||
return -EROFS; | ||
} | ||
|
||
extern "C" | ||
long syscall_SYS_faccessat2(int fd, const char *path, mode_t mode, int flag) { | ||
return strace(sys_faccessat2, "faccessat2", fd, path, mode, flag); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include "common.hpp" | ||
#include <sys/stat.h> | ||
#include <fcntl.h> | ||
|
||
static long sys_fchmodat2(int /*fd*/, const char* /*path*/, mode_t, int /*flag*/) | ||
{ | ||
// currently makes no sense, especially since we're read-only | ||
return -EROFS; | ||
} | ||
|
||
extern "C" | ||
long syscall_SYS_fchmodat2(int fd, const char *path, mode_t mode, int flag) { | ||
return strace(sys_fchmodat2, "fchmodat2", fd, path, mode, flag); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include "common.hpp" | ||
#include <sys/stat.h> | ||
|
||
long sys_statx(int /*dirfd*/, const char* /*pathname*/, int /*flags*/, | ||
unsigned int /*mask*/, struct statx* /*statxbuf*/) | ||
{ | ||
return -ENOSYS; | ||
} | ||
|
||
extern "C" | ||
long syscall_SYS_statx(int dirfd, const char *pathname, int flags, | ||
unsigned int mask, struct statx *statxbuf) { | ||
return strace(sys_statx, "statx", dirfd, pathname, flags, mask, statxbuf); | ||
} | ||
|