fix: adjust SysCalls::write signature to match stdlib

Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
Artur Harasimiuk
2024-06-14 13:12:03 +00:00
committed by Compute-Runtime-Automation
parent deb10999e1
commit 8d28f8d90e
7 changed files with 20 additions and 20 deletions

View File

@@ -86,7 +86,7 @@ int (*sysCallsReadlink)(const char *path, char *buf, size_t bufsize) = nullptr;
int (*sysCallsIoctl)(int fileDescriptor, unsigned long int request, void *arg) = nullptr;
int (*sysCallsPoll)(struct pollfd *pollFd, unsigned long int numberOfFds, int timeout) = nullptr;
ssize_t (*sysCallsRead)(int fd, void *buf, size_t count) = nullptr;
ssize_t (*sysCallsWrite)(int fd, void *buf, size_t count) = nullptr;
ssize_t (*sysCallsWrite)(int fd, const void *buf, size_t count) = nullptr;
int (*sysCallsPipe)(int pipeFd[2]) = nullptr;
int (*sysCallsFstat)(int fd, struct stat *buf) = nullptr;
char *(*sysCallsRealpath)(const char *path, char *buf) = nullptr;
@@ -345,7 +345,7 @@ ssize_t read(int fd, void *buf, size_t count) {
return 0;
}
ssize_t write(int fd, void *buf, size_t count) {
ssize_t write(int fd, const void *buf, size_t count) {
if (sysCallsWrite != nullptr) {
return sysCallsWrite(fd, buf, count);
}

View File

@@ -29,7 +29,7 @@ extern int (*sysCallsReadlink)(const char *path, char *buf, size_t bufsize);
extern int (*sysCallsIoctl)(int fileDescriptor, unsigned long int request, void *arg);
extern int (*sysCallsPoll)(struct pollfd *pollFd, unsigned long int numberOfFds, int timeout);
extern ssize_t (*sysCallsRead)(int fd, void *buf, size_t count);
extern ssize_t (*sysCallsWrite)(int fd, void *buf, size_t count);
extern ssize_t (*sysCallsWrite)(int fd, const void *buf, size_t count);
extern int (*sysCallsPipe)(int pipeFd[2]);
extern int (*sysCallsFstat)(int fd, struct stat *buf);
extern char *(*sysCallsRealpath)(const char *path, char *buf);