On 16/05/2009, Mike Frysinger <[email protected]> wrote: > please write your patches against git and use git to generate the log. that > way you also include your Signed-off-by tags. > -mike >
Done. I attach the two patches. Luca Favatella
From 7aacd89736a508479c924c42e49c46e37a372dee Mon Sep 17 00:00:00 2001 From: Luca Favatella <[email protected]> Date: Tue, 19 May 2009 10:25:25 +0200 Subject: [PATCH 1/2] login: consider platforms having no domainname field in the utsname struct Signed-off-by: Luca Favatella <[email protected]> --- include/platform.h | 5 +++++ libbb/login.c | 2 ++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/include/platform.h b/include/platform.h index 317349f..a5ab8fb 100644 --- a/include/platform.h +++ b/include/platform.h @@ -384,4 +384,9 @@ static ALWAYS_INLINE char* strchrnul(const char *s, char c) #endif #endif +/* The field domainname of struct utsname is Linux specific. */ +#ifndef __linux__ +#define HAVE_NO_UTSNAME_DOMAINNAME +#endif + #endif 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; -- 1.6.3.1
From c99a3f31368c1205c5a5f2d567d93754dd4d8476 Mon Sep 17 00:00:00 2001 From: Luca Favatella <[email protected]> Date: Tue, 19 May 2009 10:31:00 +0200 Subject: [PATCH 2/2] platform: define IUCLC on platform where it is not defined Signed-off-by: Luca Favatella <[email protected]> --- include/platform.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/include/platform.h b/include/platform.h index a5ab8fb..7cb085c 100644 --- a/include/platform.h +++ b/include/platform.h @@ -389,4 +389,10 @@ static ALWAYS_INLINE char* strchrnul(const char *s, char c) #define HAVE_NO_UTSNAME_DOMAINNAME #endif +/* It shouldn't be dangerous to define IUCLC as 0. Things like "IUCLC + | FOO" and "&= ~IUCLC" shouldn't harm. */ +#ifndef IUCLC +#define IUCLC 0 +#endif + #endif -- 1.6.3.1
_______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
