This one is very subtle. I think it can actually be both depending on what you mean. In any case подстроить in my case would mean to build something up close to an existing building, possibly even merging the 2 structures into 1. Expand an existing building if you will, like:

подстроить веранду к дому

Пристроить is to build a separate structure somewhere close to an existing building, in its vicinity. It's a bit strange to keep a barn right close to your house, so it's пристроить then.