Is the word "have" used in the same way in the following two sentences?

The only girl who would have him was the miller's daughter.

I won't have this dog in my house!
the same meaning