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 ] [ Petter Reinholdtsen ]
* Next release will be 2.89dsf. * 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 -- 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 #ifdef TIOCGDEV
unsigned int kdev; unsigned int kdev;
#endif #endif
struct stat st, st2; struct stat st;
int n;
#ifdef __linux__
char buf[256]; char buf[256];
char *p; char *p;
struct stat st2;
int didmount = 0; int didmount = 0;
int n, r; int r;
int fd; int fd;
#endif
fstat(0, &st); fstat(0, &st);
if (major(st.st_rdev) != 5 || minor(st.st_rdev) != 1) { if (major(st.st_rdev) != 5 || minor(st.st_rdev) != 1) {