Fix compile bug on APPLE for rtl_test.c

rtl_test.c has a compile error when built on a Mac. This change fixes the error and I have tested that rtl_test then bulds and runs on the Mac. Change ts (structure variable) to tg pointer on line 165 and 166