Commit 80f0d676 authored by Ondřej Zajíček's avatar Ondřej Zajíček
Browse files

Fixes type mismatch on BSD systems.

parent d0c64519
...@@ -574,10 +574,11 @@ krt_scan_shutdown(struct krt_proto *x UNUSED, int last UNUSED) ...@@ -574,10 +574,11 @@ krt_scan_shutdown(struct krt_proto *x UNUSED, int last UNUSED)
} }
static void static void
krt_sysctl_scan(struct proto *p, pool *pool, byte **buf, int *bl, int cmd) krt_sysctl_scan(struct proto *p, pool *pool, byte **buf, size_t *bl, int cmd)
{ {
byte *next; byte *next;
int obl, needed, mib[6], on; int mib[6], on;
size_t obl, needed;
struct ks_msg *m; struct ks_msg *m;
mib[0] = CTL_NET; mib[0] = CTL_NET;
...@@ -622,7 +623,7 @@ void ...@@ -622,7 +623,7 @@ void
krt_scan_fire(struct krt_proto *p) krt_scan_fire(struct krt_proto *p)
{ {
static byte *buf = NULL; static byte *buf = NULL;
static int bl = 32768; static size_t bl = 32768;
krt_sysctl_scan((struct proto *)p , p->krt_pool, &buf, &bl, NET_RT_DUMP); krt_sysctl_scan((struct proto *)p , p->krt_pool, &buf, &bl, NET_RT_DUMP);
} }
...@@ -630,7 +631,7 @@ void ...@@ -630,7 +631,7 @@ void
krt_if_scan(struct kif_proto *p) krt_if_scan(struct kif_proto *p)
{ {
static byte *buf = NULL; static byte *buf = NULL;
static int bl = 4096; static size_t bl = 4096;
struct proto *P = (struct proto *)p; struct proto *P = (struct proto *)p;
if_start_update(); if_start_update();
krt_sysctl_scan(P, P->pool, &buf, &bl, NET_RT_IFLIST); krt_sysctl_scan(P, P->pool, &buf, &bl, NET_RT_IFLIST);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment