While Marvel and Sony's relationship has gotten closer thanks to their newfound collaborative efforts on Spider-Man, the relationship between Marvel and Fox over the movie rights for the X-Men and Fantastic Four has always been seen as a bit more frosty. It seems though that recently that relationship actually thawed a bit.
Speaking as part of a Deadpool Q&A over the weekend, writers Paul Wernick and Rhett Reese revealed that Marvel and Fox actually came together to work on a deal during the development of Deadpool and Guardians of the Galaxy Vol 2. Specifically, the two studios agreed to actually swap the right to use two different characters with each other: Marvel allowed Fox usage of Negasonic Teenage Warhead in Deadpool, while Fox allowed Marvel to use Ego the Living Planet in the Guardians sequel:
Kurt Russell ['s Ego the Living Planet] in the new Guardians movie was the character that Fox swapped with Marvel to [change] Negasonic Teenage Warhead's powers.
Wernick and Reese apparently loved Negasonic's name so much they wanted her in the movie full stop -- even though in the film her powerset is radically different to the one she has in the comics. In order to use the name with a different set of powers, Marvel had to agree -- but they'd only do so if they could nab the use of Ego.
It's kind of weird that Marvel had to be consulted for it, or that Fox had the rights to Ego in the first place -- presumably as part of Fantastic Four rights rather than anything to do with the X-Men -- but still, its nice to see that the two companies could come to an agreement. Between things like Legion and the other potential X-shows and this, maybe Marvel and Fox aren't as frosty with each other as people imagine.