Add #ifdef in bootlogd.c to avoid gcc warnings about unused variable on non-linux platforms.

This commit is contained in:
Petter Reinholdtsen 2010-04-27 19:43:17 +00:00
parent 9abf8cc828
commit 608673d2e3
2 changed files with 8 additions and 2 deletions

View File

@ -7,6 +7,8 @@ sysvinit (2.89dsf) UNRELEASED; urgency=low
[ Petter Reinholdtsen ]
* Next release will be 2.89dsf.
* Add #ifdef in bootlogd.c to avoid gcc warnings about unused
variable on non-linux platforms.
-- Petter Reinholdtsen <pere@hungry.com> Sun Apr 11 11:28:55 CEST 2010

View File

@ -243,12 +243,16 @@ int consolename(char *res, int rlen)
#ifdef TIOCGDEV
unsigned int kdev;
#endif
struct stat st, st2;
struct stat st;
int n;
#ifdef __linux__
char buf[256];
char *p;
struct stat st2;
int didmount = 0;
int n, r;
int r;
int fd;
#endif
fstat(0, &st);
if (major(st.st_rdev) != 5 || minor(st.st_rdev) != 1) {