summaryrefslogtreecommitdiffstats
path: root/src/strip.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/strip.c')
-rw-r--r--src/strip.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/strip.c b/src/strip.c
index f7474418..f5920812 100644
--- a/src/strip.c
+++ b/src/strip.c
@@ -2007,7 +2007,10 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname,
/* Create the real output file. First rename, then change the
mode. */
if (rename (tmp_debug_fname, debug_fname) != 0
- || fchmod (debug_fd, mode) != 0)
+#if HAVE_DECL_FCHMOD
+ || fchmod (debug_fd, mode) != 0
+#endif
+ )
{
error (0, errno, gettext ("while creating '%s'"), debug_fname);
result = 1;