Well, I should start by saying this is all guesswork but here goes.
1. DSLRs come in varying standards of construction and finish. You'd expect the beginners' models with loads of plastic to last considerably less longer than the more expensive (read heavier and with more metal).
2. DSLRs are likely to be used with more than one lens and lens changes will, therefore, be a part of their life. Lenses with plastic mounts will probably last for less time than their metal mount counterparts.
3. Compacts also come in a range of finishes. You'd expect a creaky plastic bodied camera to fall apart sometime sooner than a well screwed together metal bodied version.
4. Compact cameras do not have interchangeable lenses so, in that respect with all else being equal, should last longer then their equivalent standard DSLR (eg you might expect a Canon S3 compact to last longer than an EOS350D + 2 kit lenses).
Of course if you were to put into the equation a DSLR with something like an 18-200 lens attached which is never removed from the body then that would, effectively, become a large compact and last longer.
It also all depends on use. Use a camera bag at all times and never drop anything and you should reasonably expect to get a lifetime of use out of a camera whatever it is. Mind you, that is probably more true of cameras produced from the 60s to the late 80s than it is since.