I've gone through some grief, so I thought I'd post my story to help others.
I had to
to force configure to use cc (Solaris Studio) instead of gcc.
Then in solaris_niagara2.c, two changes are necessary.
typedef struct __t2_pst_table
int papi_pst; // change from unsigned int to int
int _niagara2_get_system_info( papi_mdi_t mdi );
int _niagara2_get_system_info( papi_mdi_t *mdi );
Hope this helps!
Next, I have the joys of accessing PAPI from a Java program via JNI