Christian Weisgerber:

> Should we already bump major while the diff matures?

Oh, we can't quite bump yet.  tk_major und tk_minor are only set
in exec_timekeep_map(), but aren't checked anywhere.

+               timekeep->tk_major = 0;
+               timekeep->tk_minor = 0;

Those shouldn't be magic numbers but #defines in sys/timetc.h.

We only need to check those once at process startup.  In
libc/dlfcn/init.c, somewhere here:

+               case AUX_openbsd_timekeep:
+                       if (_tc_get_timecount)
+                               _timekeep = (void *)aux->au_v;
+                       break;

Something like this I think:

                case AUX_openbsd_timekeep:
                        if (_tc_get_timecount) {
                                struct timekeep *tk = (void *)aux->au_v;
                                if ((tk != NULL) &&
                                    (tk->tk_major == TK_MAJOR) &&
                                    (tk->tk_minor >= TK_MINOR))
                                        _timekeep = tk;
                        }
                        break;

-- 
Christian "naddy" Weisgerber                          na...@mips.inka.de

Reply via email to