Browse Source

audit: Avoid build failures on systems without renameat

renameat has been deprecated in favor of renameat2 for new ports.  This
allows the audit tests to build on RISC-V.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Palmer Dabbelt 7 years ago
parent
commit
155d33af7e
1 changed files with 2 additions and 0 deletions
  1. 2 0
      include/asm-generic/audit_dir_write.h

+ 2 - 0
include/asm-generic/audit_dir_write.h

@@ -27,7 +27,9 @@ __NR_mknod,
 __NR_mkdirat,
 __NR_mknodat,
 __NR_unlinkat,
+#ifdef __NR_renameat
 __NR_renameat,
+#endif
 __NR_linkat,
 __NR_symlinkat,
 #endif