Added #define for the rand_s function in sample