From f3653f0d204a07d80444c261126360901b849e37 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 2 Apr 2008 13:52:04 +0200 Subject: copy.c: remove an in-function #ifdef * src/copy.c (rpl_mkfifo) [! HAVE_MKFIFO]: New function. (mkfifo) [! HAVE_MKFIFO]: Define to rpl_mkfifo. (copy_internal): Remove #ifdef. Signed-off-by: Jim Meyering --- src/copy.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/copy.c b/src/copy.c index 208a67413..4e38e0021 100644 --- a/src/copy.c +++ b/src/copy.c @@ -65,6 +65,16 @@ # define lchown(name, uid, gid) chown (name, uid, gid) #endif +#ifndef HAVE_MKFIFO +static int +rpl_mkfifo (char const *file, mode_t mode) +{ + errno = ENOTSUP; + return -1; +} +#define mkfifo rpl_mkfifo +#endif + #ifndef USE_ACL # define USE_ACL 0 #endif @@ -1828,9 +1838,7 @@ copy_internal (char const *src_name, char const *dst_name, does not. But fall back on mkfifo, because on some BSD systems, mknod always fails when asked to create a FIFO. */ if (mknod (dst_name, src_mode & ~omitted_permissions, 0) != 0) -#if HAVE_MKFIFO if (mkfifo (dst_name, src_mode & ~S_IFIFO & ~omitted_permissions) != 0) -#endif { error (0, errno, _("cannot create fifo %s"), quote (dst_name)); goto un_backup; -- cgit v1.2.3-70-g09d2