mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Replace system calls that accept a path with *at versions.
This commit is contained in:
parent
921deb6eeb
commit
1fa2df3e6a
13 changed files with 68 additions and 44 deletions
|
@ -22,12 +22,12 @@
|
|||
|
||||
*******************************************************************************/
|
||||
|
||||
#include <sys/syscall.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
DEFN_SYSCALL2(int, SysTruncate, SYSCALL_TRUNCATE, const char*, off_t);
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
extern "C" int truncate(const char* pathname, off_t length)
|
||||
{
|
||||
return SysTruncate(pathname, length);
|
||||
return truncateat(AT_FDCWD, pathname, length);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue