1 /* Test for utimensat() syscall which is available on newer Solaris. */ 2 3 #include "scalar.h" 4 5 __attribute__((noinline)) 6 static void sys_utimensat(void) 7 { 8 GO(SYS_utimensat, "4s 2m"); 9 SY(SYS_utimensat, x0 - 1, x0 + 1, x0 + 1, x0); FAIL; 10 } 11 12 __attribute__((noinline)) 13 static void sys_utimensat2(void) 14 { 15 GO(SYS_utimensat, "4s 0m"); 16 SY(SYS_utimensat, x0 - 1, x0 + NULL, x0 + NULL, x0); FAIL; 17 } 18 19 int main(void) 20 { 21 /* Uninitialised, but we know px[0] is 0x0. */ 22 long *px = malloc(sizeof(long)); 23 x0 = px[0]; 24 25 /* SYS_utimensat 110 */ 26 sys_utimensat(); 27 sys_utimensat2(); 28 29 return 0; 30 } 31 32