I'm trying to use shared memory following this example. For this to work I need to create an XshmSegmentInfo and change the values of its fields.
I have found a workaround: the definition can be copied and whenever a pointer to an XshmSegmentInfo is needed, the pointer can be cast to that type.