[quagga-dev 4355] Re: Quagga 0.99.3 compile on OpenBSD 3.8

Tom Everett tom at khubla.com
Tue Sep 12 04:16:22 BST 2006


Guys, I just tried to compile both Quagga 0.98.6 and 0.99.4 on OpenBSD 
3.9 and the "RTM" problem is still there, in both cases. 

Specifically (on the 0.98.6 build):

kernel_socket.c:139: error: `RTM_OLDADD' undeclared here (not in a function)
kernel_socket.c:139: error: initializer element is not constant

I applied the same patch as I suggested earlier, to the 0.98.6 source:

# diff -u kernel_socket.c kernel_socket.c.tge 
--- kernel_socket.c     Mon Sep 11 15:00:31 2006
+++ kernel_socket.c.tge Mon Sep 11 14:53:56 2006
@@ -88,10 +88,8 @@
   {RTM_REDIRECT, "RTM_REDIRECT"},
   {RTM_MISS,     "RTM_MISS"},
   {RTM_LOCK,     "RTM_LOCK"},
-#ifndef OPEN_BSD
   {RTM_OLDADD,   "RTM_OLDADD"},
   {RTM_OLDDEL,   "RTM_OLDDEL"},
-#endif
   {RTM_RESOLVE,  "RTM_RESOLVE"},
   {RTM_NEWADDR,  "RTM_NEWADDR"},
   {RTM_DELADDR,  "RTM_DELADDR"},
#

and things seem to compile.  I've used this patch for some time on 
OpenBSD 3.8 and it works well.  I hope to use it on my new OpenBSD 3.9 
systems.

grepping the source base, it doesn't seem that RTM_OLDADD and RTL_OLDDEL 
are specifically referred to anythere in the source tree:

# grep -rn RTM_OLDDEL *  
zebra/kernel_socket.c:93:  {RTM_OLDDEL,   "RTM_OLDDEL"},
# grep -rn RTM_OLDADD *
zebra/kernel_socket.c:92:  {RTM_OLDADD,   "RTM_OLDADD"},
#

is this a patch that could be included in the source tree?

As before, I apologize if I'm suggesting a terrible hack. ;)

- Tom Everett


Paul Jakma wrote:
> Hi Tom,
>
> On Thu, 16 Feb 2006, Tom Everett wrote:
>
>> I was unable to compile 0.99.3 on OpenBSD 3.8.  Two changes were 
>> required, which make it work nicely.
>
> That's a really recent OpenBSD right?
>
>> --- quagga-0.99.3/lib/zebra.h   Wed Jan 11 20:24:56 2006
>> +++ quagga-0.99.3_tge/lib/zebra.h       Thu Feb 16 13:10:23 2006
>> @@ -29,6 +29,11 @@
>> #define _GNU_SOURCE
>> #endif /* GNU_LINUX */
>>
>> +#ifdef OPEN_BSD
>> +#include <inttypes.h>
>> +#define UINT16_MAX 65535
>> +#endif /* OPEN_BSD */
>
> Is this not a deficiency in OpenBSD? They should provide UINT16_MAX, 
> if they provide uint16_t. Ie might it be a better idea to file this as 
> a bug against OBSD?
>
>> +#ifndef OPEN_BSD
>>  {RTM_OLDADD,   "RTM_OLDADD"},
>>  {RTM_OLDDEL,   "RTM_OLDDEL"},
>> +#endif /* OPEN_BSD */
>
> Hmm, I wonder what platforms use those, I'll look into that. Simply 
> removing them might be the better option, if there are no platforms we 
> care about that use it (if there are, it should be #ifdef <that 
> platform>).
>
>> I apologize in advance if my changes are cheap hacks, or don't follow 
>> existing coding standards for quagga.  I have only tested this for RIP.
>
> Fine, thanks!
>
> regards,



More information about the Quagga-dev mailing list