--- Makefile.in.old	2015-03-15 03:34:07.000000000 +0100
+++ Makefile.in	2015-03-15 03:35:32.000000000 +0100
@@ -262,6 +263,7 @@
 		-e 's:@PERL''@:$(PERL):g'				\
 		-e 's:@BASH''@:$(BASH):g'				\
 		-e 's:@PATCH''@:$(PATCH):g'				\
+		-e 's:@STAT''@:$(STAT):g'				\
 		-e 's:@STAT_HARDLINK''@:$(STAT_HARDLINK):g'		\
 		-e 's:@VERSION''@:$(VERSION):g'				\
 		-e 's:@ETCDIR''@:$(etcdir):g'				\
--- quilt/scripts/backup-files.in.old	2015-03-15 03:34:07.000000000 +0100
+++ quilt/scripts/backup-files.in	2015-03-15 03:37:19.000000000 +0100
@@ -61,7 +61,7 @@
 	local filename=$1
 	local link_count tmpname
 
-	link_count=$(stat @STAT_HARDLINK@ "$filename")
+	link_count=$(@STAT@ @STAT_HARDLINK@ "$filename")
 	if [ $link_count -gt 1 ]; then
 		tmpname=$(mktemp "$filename.XXXXXX")
 		cp -p "$filename" "$tmpname"
@@ -91,7 +91,7 @@
 
 	if [ -L "$file" -o -e "$file" ]; then
 		$ECHO "Copying $file"
-		if [ -n "$OPT_NOLINKS" -a "$(stat @STAT_HARDLINK@ "$file")" = 1 ]; then
+		if [ -n "$OPT_NOLINKS" -a "$(@STAT@ @STAT_HARDLINK@ "$file")" = 1 ]; then
 			cp -p "$file" "$backup"
 		else
 			ln "$file" "$backup" 2>&4 || cp -p "$file" "$backup"
@@ -264,7 +264,7 @@
 some_files_have_links()
 {
 	(cd "$OPT_PREFIX" && find . -type f -print0) \
-	| xargs -0 stat @STAT_HARDLINK@ 2>&4 | grep -qv '^1$'
+	| xargs -0 @STAT@ @STAT_HARDLINK@ 2>&4 | grep -qv '^1$'
 }
 
 
