summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/force-link.c11
-rw-r--r--src/force-link.h1
2 files changed, 3 insertions, 9 deletions
diff --git a/src/force-link.c b/src/force-link.c
index e0db07574..15ebb8c18 100644
--- a/src/force-link.c
+++ b/src/force-link.c
@@ -24,17 +24,12 @@
a window where B does not exist. */
#include <config.h>
+#include "system.h"
#include "force-link.h"
-#include <dirname.h>
#include <tempname.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
/* A basename pattern suitable for a temporary file. It should work
even on file systems like FAT that support only short names.
"Cu" is short for "Coreutils" or for "Changeable unstable",
@@ -94,7 +89,7 @@ try_link (char *dest, void *arg)
1 if successful and DSTNAME already existed,
0 if successful and DSTNAME did not already exist, and
-1 (setting errno) on failure. */
-int
+extern int
force_linkat (int srcdir, char const *srcname,
int dstdir, char const *dstname, int flags, bool force)
{
@@ -149,7 +144,7 @@ try_symlink (char *dest, void *arg)
1 if successful and DSTNAME already existed,
0 if successful and DSTNAME did not already exist, and
-1 (setting errno) on failure. */
-int
+extern int
force_symlinkat (char const *srcname, int dstdir, char const *dstname,
bool force)
{
diff --git a/src/force-link.h b/src/force-link.h
index 2a690f680..7ea3817de 100644
--- a/src/force-link.h
+++ b/src/force-link.h
@@ -1,3 +1,2 @@
-#include <stdbool.h>
extern int force_linkat (int, char const *, int, char const *, int, bool);
extern int force_symlinkat (char const *, int, char const *, bool);