From 33269d525200e823080532b5f4e497592e5d444a Mon Sep 17 00:00:00 2001 From: Frodo Looijaard Date: Thu, 14 Jan 1999 00:41:44 +0000 Subject: [PATCH] Small fixes to make all programs compile cleanly with libc6. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@168 7894878c-1315-0410-8ee3-d5d059ff63e0 --- Makefile | 8 ++++---- TODO | 2 ++ lib/conf-parse.y | 1 + prog/detect/i2cdetect.c | 2 ++ prog/dump/i2cdetect.c | 2 ++ prog/dump/i2cdump.c | 2 ++ prog/dump/isadump.c | 5 +++++ 7 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 95304c61..8d86c7e4 100644 --- a/Makefile +++ b/Makefile @@ -133,6 +133,10 @@ CFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \ -Wcast-align -Wwrite-strings -Wnested-externs -Winline endif +ifeq ($(I2C),1) +CFLAGS += -DI2C +endif + MODCFLAGS := $(CFLAGS) -D__KERNEL__ -DMODULE -fomit-frame-pointer PROGCFLAGS := $(CFLAGS) ARCFLAGS := $(CFLAGS) @@ -146,10 +150,6 @@ ifeq ($(MODVER),1) MODCFLAGS += -DMODVERSIONS -include /usr/include/linux/modversions.h endif -ifeq ($(I2C),1) -MODCFLAGS += -DI2C -endif - .PHONY: all clean install version package dep # Make all the default rule diff --git a/TODO b/TODO index 4d83ca9f..bdd4e62e 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,7 @@ Many, many things. Most notably: +* Create wait-queues for bus locking instead of pure semaphores, to make + it more interactive * Check for block read/writes in smbus-on-i2c emulation code * Merge newest Simon Vogl archive * Merge man-pages diff --git a/lib/conf-parse.y b/lib/conf-parse.y index 4c63108b..f8d07c67 100644 --- a/lib/conf-parse.y +++ b/lib/conf-parse.y @@ -28,6 +28,7 @@ #include "general.h" #include "error.h" #include "conf.h" +#include "access.h" /* These two functions are defined in conf-lex.l */ extern int sensors_yylex(void); diff --git a/prog/detect/i2cdetect.c b/prog/detect/i2cdetect.c index 293a4ab6..33a24134 100644 --- a/prog/detect/i2cdetect.c +++ b/prog/detect/i2cdetect.c @@ -18,6 +18,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include +#include #include #include #include diff --git a/prog/dump/i2cdetect.c b/prog/dump/i2cdetect.c index 293a4ab6..33a24134 100644 --- a/prog/dump/i2cdetect.c +++ b/prog/dump/i2cdetect.c @@ -18,6 +18,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include +#include #include #include #include diff --git a/prog/dump/i2cdump.c b/prog/dump/i2cdump.c index ebbdd571..53ff6b29 100644 --- a/prog/dump/i2cdump.c +++ b/prog/dump/i2cdump.c @@ -17,6 +17,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include +#include #include #include #include diff --git a/prog/dump/isadump.c b/prog/dump/isadump.c index 191fb5b8..8fa77899 100644 --- a/prog/dump/isadump.c +++ b/prog/dump/isadump.c @@ -22,6 +22,11 @@ #include #include +/* To keep glibc2 happy */ +#ifdef __GLIBC__ +#include +#endif + char hexchar(int i) { if ((i >= 0) && (i <= 9))