2.0 kernel compile fails

Martin Mares mj at ucw.cz
Sat Jun 17 01:06:03 CEST 2000


Hello!

> On an older, originally Slackware, kernel 2.0 system, I get
> 
> configure --disable-client   
> make
> 
> ...
> make[2]: Leaving directory `/usr/src/routing/bird-1.0.0/obj/proto/static'
> gcc  -o ../bird nest/all.o filter/all.o proto/bgp/all.o proto/ospf/all.o proto/pipe/all.o proto/rip/all.o proto/static/all.o conf/all.o lib/birdlib.a 
> lib/birdlib.a(io.o): In function `sk_open_unix':
> /usr/src/routing/bird-1.0.0/obj/lib/io.c:777: undefined reference to `SUN_LEN'
> make[1]: *** [../bird] Error 1
> make[1]: Leaving directory `/usr/src/routing/bird-1.0.0/obj'
> make: *** [all] Error 2
> 
> What is missing here?

Please try this patch.

				Have a nice fortnight
-- 
Martin `MJ' Mares   <mj at ucw.cz>   http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"How do I type 'for i in *.dvi do xdvi $i done' in a GUI?"


diff -u -r1.16 client.c
--- client/client.c	2000/06/09 07:30:22	1.16
+++ client/client.c	2000/06/16 23:05:13
@@ -22,6 +22,7 @@
 #include "lib/resource.h"
 #include "lib/string.h"
 #include "client/client.h"
+#include "sysdep/unix/unix.h"
 
 static char *opt_list = "s:v";
 static int verbose;
@@ -69,7 +70,7 @@
 /*** Input ***/
 
 static void server_send(char *);
-static void io_loop(int);
+static void select_loop(int);
 
 /* HACK: libreadline internals we need to access */
 extern int _rl_vis_botlin;
@@ -112,7 +113,7 @@
 	    {
 	      server_send(cmd);
 	      input_hidden = -1;
-	      io_loop(0);
+	      select_loop(0);
 	      input_hidden = 0;
 	    }
 	  free(cmd);
@@ -316,7 +317,7 @@
 static fd_set select_fds;
 
 static void
-io_loop(int mode)
+select_loop(int mode)
 {
   server_reply = -1;
   while (mode || server_reply < 0)
@@ -384,10 +385,10 @@
   parse_args(argc, argv);
   cmd_build_tree();
   server_connect();
-  io_loop(0);
+  select_loop(0);
 
   input_init();
 
-  io_loop(1);
+  select_loop(1);
   return 0;
 }
diff -u -r1.15 unix.h
--- sysdep/unix/unix.h	2000/06/09 07:32:57	1.15
+++ sysdep/unix/unix.h	2000/06/16 23:05:14
@@ -34,6 +34,10 @@
 typedef struct sockaddr_in sockaddr;
 #endif
 
+#ifndef SUN_LEN
+#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) + strlen ((ptr)->sun_path))
+#endif
+
 struct birdsock;
 
 void io_init(void);



More information about the Bird-users mailing list