--- lib/renameatu.c.orig	2026-01-04 01:27:29
+++ lib/renameatu.c	2026-03-25 21:59:47
@@ -39,10 +39,13 @@ errno_fail (int e)
   return -1;
 }
 
+#if HAVE_RENAMEAT || RENAME_TRAILING_SLASH_DEST_BUG || RENAME_TRAILING_SLASH_SOURCE_BUG
+# include <string.h>
+#endif
+
 #if HAVE_RENAMEAT
 
 # include <stdlib.h>
-# include <string.h>
 
 # include "dirname.h"
 # include "openat.h"
