diff options
Diffstat (limited to 'sysdep')
-rw-r--r-- | sysdep/unix/main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index 23040e54..bd80ba2c 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -97,9 +97,10 @@ static inline void add_num_const(char *name, int val) { struct symbol *s = cf_find_symbol(name); - s->class = SYM_NUMBER; - s->def = NULL; - s->aux = val; + s->class = SYM_CONSTANT | T_INT; + s->def = cfg_allocz(sizeof(struct f_val)); + SYM_TYPE(s) = T_INT; + SYM_VAL(s).i = val; } /* the code of read_iproute_table() is based on |