88#include "hook.h"
99
1010#define _GNU_SOURCE
11- #include <fcntl.h>
1211#include <sys/types.h>
1312#include <sys/stat.h>
1413#include <fcntl.h>
@@ -265,6 +264,7 @@ int unlink(const char *pathname)
265264 }
266265}
267266
267+ #ifdef HAS_RENAMEAT2
268268int renameat2 (int olddirfd , const char * oldpath ,
269269 int newdirfd , const char * newpath , unsigned int flags )
270270{
@@ -311,12 +311,14 @@ int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpat
311311{
312312 return renameat2 (olddirfd , oldpath , newdirfd , newpath , 0 );
313313}
314+ #endif
314315
315316int rename (const char * oldpath , const char * newpath )
316317{
317318 return renameat (AT_FDCWD , oldpath , AT_FDCWD , newpath );
318319}
319320
321+ # ifdef HAS_STATX
320322int statx (int dirfd , const char * pathname , int flags , unsigned int mask ,
321323 struct statx * statxbuf )
322324{
@@ -337,7 +339,7 @@ int statx(int dirfd, const char *pathname, int flags, unsigned int mask,
337339 FILE_ALLOC (fe , EVENT_FILE_STATX );
338340 fe -> in .read_ctx .buf = strdup (pathname );
339341 fe -> var .statxbuf = (struct statx * ) malloc (sizeof (struct statx ));
340- memcpy (fe -> var .statxbuf , statxbuf , sizeof (struct statx ));
342+ // memcpy(fe->var.statxbuf, statxbuf, sizeof(struct statx));
341343
342344 event_uring_file_statx (ev , fe , dirfd , fe -> in .read_ctx .buf , flags , mask ,
343345 fe -> var .statxbuf );
@@ -388,6 +390,7 @@ int stat(const char *pathname, struct stat *statbuf)
388390 statbuf -> st_ctim .tv_sec = statxbuf .stx_ctime .tv_sec ;
389391 return 0 ;
390392}
393+ #endif
391394
392395int mkdirat (int dirfd , const char * pathname , mode_t mode )
393396{
0 commit comments