test_getdomainname_dynamic.c (271B)
1 #define _GNU_SOURCE 2 #define _DEFAULT_SOURCE 3 4 #include "common.h" 5 6 #include <unistd.h> 7 8 int main(int argc, char** argv) { 9 char buffer[8] = {0}; 10 11 getdomainname(buffer, 6); 12 13 CHK_FAIL_START 14 getdomainname(buffer, argc); 15 CHK_FAIL_END 16 17 puts(buffer); 18 return ret; 19 }