-- sourced from http://marc.info/?l=quagga-dev&m=122470854730992&w=2
-- zebra/*_null.c - Removed #pragma weak to be compatibile with gcc 4.0.1 from Apple xcode.

--- zebra/ioctl_null.c
+++ zebra/ioctl_null.c
@@ -19,19 +19,16 @@ int if_unset_prefix (struct interface *a, struct connected *b)
 }
 
 int if_prefix_add_ipv6 (struct interface *a, struct connected *b) { return 0; }
-#pragma weak if_prefix_delete_ipv6 = if_prefix_add_ipv6
-
+int if_prefix_delete_ipv6 (struct interface *a, struct connected *b) { return 0; }
 int if_ioctl (u_long a, caddr_t b) { return 0; }
-
 int if_set_flags (struct interface *a, uint64_t b) { return 0; }
-#pragma weak if_unset_flags = if_set_flags
-
+int if_unset_flags (struct interface *a, uint64_t b) { return 0; }
 void if_get_flags (struct interface *a) { return; }
-#pragma weak if_get_metric = if_get_flags
-#pragma weak if_get_mtu = if_get_flags
+void if_get_metric(struct interface *a) { return; }
+void if_get_mtu(struct interface *a) { return; }
 
 #ifdef SOLARIS_IPV6
-#pragma weak if_ioctl_ipv6 = if_ioctl
+int if_ioctl_ipv6 (u_long a, caddr_t b) { return 0; }
 struct connected *if_lookup_linklocal(struct interface *a) { return 0; }
 
 #define AF_IOCTL(af, request, buffer) \

--- zebra/kernel_null.c
+++ zebra/kernel_null.c
@@ -9,9 +9,11 @@
 #include "zebra/connected.h"
 
 int kernel_add_ipv4 (struct prefix *a, struct rib *b) { return 0; }
-#pragma weak kernel_delete_ipv4 = kernel_add_ipv4
+int kernel_delete_ipv4  (struct prefix *a, struct rib *b) { return 0; }
+
 int kernel_add_ipv6 (struct prefix *a, struct rib *b) { return 0; }
-#pragma weak kernel_delete_ipv6 = kernel_add_ipv6
+int kernel_delete_ipv6 (struct prefix *a, struct rib *b) { return 0; }
+
 int kernel_delete_ipv6_old (struct prefix_ipv6 *dest, struct in6_addr *gate,
                             unsigned int index, int flags, int table)
 { return 0; }
@@ -37,4 +39,4 @@ int kernel_address_delete_ipv4 (struct interface *a, struct connected *b)
 }
 
 void kernel_init (void) { return; }
-#pragma weak route_read = kernel_init
+void route_read  (void) { return; }
diff --git a/zebra/misc_null.c b/zebra/misc_null.c
index 7359430..8dba0ab 100644
--- zebra/misc_null.c
+++ zebra/misc_null.c
@@ -6,6 +6,6 @@
 #include "zebra/interface.h"
 
 void ifstat_update_proc (void) { return; }
-#pragma weak rtadv_config_write = ifstat_update_proc
-#pragma weak irdp_config_write = ifstat_update_proc
-#pragma weak ifstat_update_sysctl = ifstat_update_proc
+void rtadv_config_write (struct vty *vty, struct interface *ifp) { return; }
+void irdp_config_write  (struct vty *vty, struct interface *ifp) { return; }
+void ifstat_update_sysctl(void) { return; }
diff --git a/zebra/redistribute_null.c b/zebra/redistribute_null.c
index e57a73b..7072894 100644
--- zebra/redistribute_null.c
+++ zebra/redistribute_null.c
@@ -6,21 +6,21 @@
 
 void zebra_redistribute_add (int a, struct zserv *b, int c)
 { return; }
-#pragma weak zebra_redistribute_delete = zebra_redistribute_add
-#pragma weak zebra_redistribute_default_add = zebra_redistribute_add
-#pragma weak zebra_redistribute_default_delete = zebra_redistribute_add
+void zebra_redistribute_delete  (int a, struct zserv *b, int c) { return; }
+void zebra_redistribute_default_add (int a, struct zserv *b, int c) { return; }
+void zebra_redistribute_default_delete (int a, struct zserv *b, int c) { return; }
 
 void redistribute_add (struct prefix *a, struct rib *b)
 { return; }
-#pragma weak redistribute_delete = redistribute_add
+void redistribute_delete (struct prefix *a, struct rib *b) { return; }
 
 void zebra_interface_up_update (struct interface *a)
 { return; }
-#pragma weak zebra_interface_down_update = zebra_interface_up_update
-#pragma weak zebra_interface_add_update = zebra_interface_up_update
-#pragma weak zebra_interface_delete_update = zebra_interface_up_update
+void zebra_interface_down_update  (struct interface *a) { return; }
+void zebra_interface_add_update (struct interface *a) { return; }
+void zebra_interface_delete_update (struct interface *a) { return; }
 
 void zebra_interface_address_add_update (struct interface *a,
 					 	struct connected *b)
 { return; }
-#pragma weak zebra_interface_address_delete_update = zebra_interface_address_add_update
+void zebra_interface_address_delete_update(struct interface *a, struct connected *b) { return; }

