From 1bcffc747f5b34f6edd88ad0d33f64e9133abff5 Mon Sep 17 00:00:00 2001 From: Xin LI Date: Fri, 20 Jan 2017 06:45:06 +0000 Subject: [PATCH] Revert r312404 as we need to do an exp-run and fix existing ports that rely on the previous behavior. Requested by: antonie (portmgr) --- usr.bin/sed/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/sed/main.c b/usr.bin/sed/main.c index 572e837b799a..742881b649ba 100644 --- a/usr.bin/sed/main.c +++ b/usr.bin/sed/main.c @@ -391,7 +391,7 @@ mf_fgets(SPACE *sp, enum e_spflag spflag) if (inplace != NULL) { if (lstat(fname, &sb) != 0) err(1, "%s", fname); - if (!S_ISREG(sb.st_mode)) + if (!(sb.st_mode & S_IFREG)) errx(1, "%s: %s %s", fname, "in-place editing only", "works for regular files");