Problem accessing struct member

I have a struct as follows...

struct A
{
int a;
ucontext_t X; //ucontext_t is another structure
}

How do I define a pointer to the above structure variable X of the type ucontext_t from within another function?

eg. void foo()
{
struct A a;
/////WHAT COMES IN HERE?///////////////
}

void foo()
{
  struct A a;
  ucontext_t *p=&(a.X);
}

Note that you can't return that pointer. It will cease to be valid when the function returns as it's a local variable.