A number followed by -odd is an idiomatic expression. The word "odd" here has no literal meaning as such. I had to search the OED to find the relevant entries for this usage. It has no negative connotations. It's basically a way to refer to an approximate number.
So forty-odd years means something very similar to between 40 and 50 years, approximately within that range or thereabouts. Possible synonyms are: forty-something, or forty and a bit, or forty or so, or specifically when talking about peoples' ages: in his forties.
odd, adj., n.1, and adv.
A. adj. I. With reference to number.
4. More generally: used to denote a remainder or numerical surplus over
and above a ‘round number’ (as a multiple of ten or a similar unit
such as dozen, etc.), and thus becoming virtually an indefinite
cardinal number of lower denomination than the round number named.
c. Immediately following the numeral (usually one that denotes multiples of ten) forming a phrase preceding the noun modified. Now
often in weakened use (frequently hyphenated): ‘or so’; ‘or
thereabouts’.
1597 W. Shakespeare Richard III iv. i. 95 Eightie odde yeares of
sorrow haue I seene
Source: OED.com.