svn commit: r363230 - head/usr.bin/xinstall
Alex Richardson
arichardson at FreeBSD.org
Wed Jul 15 17:24:42 UTC 2020
Author: arichardson
Date: Wed Jul 15 17:24:39 2020
New Revision: 363230
URL: https://svnweb.freebsd.org/changeset/base/363230
Log:
Allow install(1)'s create_tempfile() to work on Linux hosts
GLibc expects six 'X' characters in the mkstemp template argument and
will return EINVAL otherwise.
Reviewed By: emaste, imp, mjg
Differential Revision: https://reviews.freebsd.org/D25662
Modified:
head/usr.bin/xinstall/install.1
head/usr.bin/xinstall/xinstall.c
Modified: head/usr.bin/xinstall/install.1
==============================================================================
--- head/usr.bin/xinstall/install.1 Wed Jul 15 17:24:34 2020 (r363229)
+++ head/usr.bin/xinstall/install.1 Wed Jul 15 17:24:39 2020 (r363230)
@@ -301,8 +301,8 @@ This is mainly for use in debugging the
.Fx
Ports Collection.
.Sh FILES
-.Bl -tag -width "INS at XXXX" -compact
-.It Pa INS at XXXX
+.Bl -tag -width "INS at XXXXXX" -compact
+.It Pa INS at XXXXXX
If either
.Fl S
option is specified, or the
@@ -312,9 +312,9 @@ or
option is used in conjunction with the
.Fl s
option, temporary files named
-.Pa INS at XXXX ,
+.Pa INS at XXXXXX ,
where
-.Pa XXXX
+.Pa XXXXXX
is decided by
.Xr mkstemp 3 ,
are created in the target directory.
Modified: head/usr.bin/xinstall/xinstall.c
==============================================================================
--- head/usr.bin/xinstall/xinstall.c Wed Jul 15 17:24:34 2020 (r363229)
+++ head/usr.bin/xinstall/xinstall.c Wed Jul 15 17:24:39 2020 (r363230)
@@ -1161,7 +1161,7 @@ create_tempfile(const char *path, char *temp, size_t t
p++;
else
p = temp;
- (void)strncpy(p, "INS at XXXX", &temp[tsize - 1] - p);
+ (void)strncpy(p, "INS at XXXXXX", &temp[tsize - 1] - p);
temp[tsize - 1] = '\0';
return (mkstemp(temp));
}
More information about the svn-src-all
mailing list