diff --git a/include/platform.h b/include/platform.h index 317349f..e2136a2 100644 --- a/include/platform.h +++ b/include/platform.h @@ -363,4 +363,14 @@ #endif #endif +/* The field domainname of struct utsname is Linux specific. */ +#if !defined(__linux__) +# define HAVE_NO_UTSNAME_DOMAINNAME +#endif + +/* If this system doesn't have IUCLC bit in struct termios::c_iflag... */ +#ifndef IUCLC +# define IUCLC 0 +#endif + #endif /* platform.h */ diff --git a/libbb/login.c b/libbb/login.c index b3e199c..98e641c 100644 --- a/libbb/login.c +++ b/libbb/login.c @@ -62,10 +62,12 @@ void FAST_FUNC print_login_issue(const char *issue_file, const char *tty) case 'm': outbuf = uts.machine; break; +#ifndef HAVE_NO_UTSNAME_DOMAINNAME case 'D': case 'o': outbuf = uts.domainname; break; +#endif case 'd': strftime(buf, sizeof(buf), fmtstr_d, localtime(&t)); break;