summaryrefslogtreecommitdiffstats
path: root/mdoc_validate.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r--mdoc_validate.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index b728d52f..fa9f3e13 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -2130,14 +2130,17 @@ post_os(POST_ARGS)
return(0);
}
#else /*!OSNAME */
- if (-1 == uname(&utsname))
- return(mdoc_nmsg(mdoc, n, MANDOCERR_UTSNAME));
+ if (uname(&utsname)) {
+ mdoc_nmsg(mdoc, n, MANDOCERR_UNAME);
+ mdoc->meta.os = mandoc_strdup("UNKNOWN");
+ return(post_prol(mdoc));
+ }
if (strlcat(buf, utsname.sysname, BUFSIZ) >= BUFSIZ) {
mdoc_nmsg(mdoc, n, MANDOCERR_MEM);
return(0);
}
- if (strlcat(buf, " ", 64) >= BUFSIZ) {
+ if (strlcat(buf, " ", BUFSIZ) >= BUFSIZ) {
mdoc_nmsg(mdoc, n, MANDOCERR_MEM);
return(0);
}