2.1.26, compiler chokes

Marco Mariani (m.mariani@imola.nettuno.it)
Wed, 12 Feb 1997 21:15:19 +0100 (MET)


I hope my copy of the source is not damaged, I don't play with fancy
patches so it should be OK.

Trying to compile with many options, I've got the following:

file | line | error (*=trivial)
----------------------+------+-------------------------------------
i386/kernel/time.c 272 * `lost_ticks' undeclared
i386/kernel/time.c 273 * `USECS_PER_JIFFY' undeclared
drivers/net/strip.c 1624 `dev' undeclared
drivers/net/ni52.c 168 * parse error before `{'
drivers/net/dlci.c 299 * `FAULT' undeclared
drivers/net/cs89x0.c 1174 * unterminated comment
net/802/fddi.c 134 `ETH_P_8022' undeclared
drivers/net/sdla.c 435 undefined reference to `amemcpy'

Here's the patch for the trivial ones:

diff -ruN 2.1.26.orig/linux/arch/i386/kernel/time.c 2.1.26/linux/arch/i386/kernel/time.c
--- 2.1.26.orig/linux/arch/i386/kernel/time.c Wed Feb 12 10:39:40 1997
+++ 2.1.26/linux/arch/i386/kernel/time.c Wed Feb 12 21:10:37 1997
@@ -34,17 +34,17 @@

extern int setup_x86_irq(int, struct irqaction *);

+extern volatile unsigned long lost_ticks;
+
+/* change this if you have some constant time drift */
+#define USECS_PER_JIFFY (1000020/HZ)
+
#ifndef CONFIG_APM /* cycle counter may be unreliable */
/* Cycle counter value at the previous timer interrupt.. */
static struct {
unsigned long low;
unsigned long high;
} init_timer_cc, last_timer_cc;
-
-extern volatile unsigned long lost_ticks;
-
-/* change this if you have some constant time drift */
-#define USECS_PER_JIFFY (1000020/HZ)

static unsigned long do_fast_gettimeoffset(void)
{
diff -ruN 2.1.26.orig/linux/drivers/net/cs89x0.c 2.1.26/linux/drivers/net/cs89x0.c
--- 2.1.26.orig/linux/drivers/net/cs89x0.c Mon Feb 3 18:54:16 1997
+++ 2.1.26/linux/drivers/net/cs89x0.c Wed Feb 12 21:11:23 1997
@@ -1179,4 +1179,4 @@
* c-indent-level: 8
* tab-width: 8
* End:
- *
+ */
diff -ruN 2.1.26.orig/linux/drivers/net/dlci.c 2.1.26/linux/drivers/net/dlci.c
--- 2.1.26.orig/linux/drivers/net/dlci.c Mon Feb 3 18:54:18 1997
+++ 2.1.26/linux/drivers/net/dlci.c Wed Feb 12 21:11:15 1997
@@ -296,7 +296,7 @@
if (!get)
{
if(copy_from_user(&config, conf, sizeof(struct dlci_conf)))
- return -FAULT;
+ return -EFAULT;
if (config.flags & ~DLCI_VALID_FLAGS)
return(-EINVAL);
memcpy(&dlp->config, &config, sizeof(struct dlci_conf));
diff -ruN 2.1.26.orig/linux/drivers/net/ni52.c 2.1.26/linux/drivers/net/ni52.c
--- 2.1.26.orig/linux/drivers/net/ni52.c Mon Feb 3 18:54:21 1997
+++ 2.1.26/linux/drivers/net/ni52.c Wed Feb 12 21:11:04 1997
@@ -164,8 +164,7 @@
#define DELAY_18(); { __delay( (loops_per_sec>>18)+1 ); }

/* wait for command with timeout: */
-#define WAIT_4_SCB_CMD()
-{ int i; \
+#define WAIT_4_SCB_CMD() { int i; \
for(i=0;i<16384;i++) { \
if(!p->scb->cmd_cuc) break; \
DELAY_18(); \

All The Best,
Marco

I love this fucking University, and this University loves fucking me.