Home | History | Annotate | Download | only in tests
      1 #include <stdio.h>
      2 #include <stdlib.h>
      3 #include <sys/types.h>
      4 #include <sys/socket.h>
      5 
      6 
      7 // It's legit to have NULL buffers;  before the bug was fixed Valgrind
      8 // reported spurious errors for the buffers.
      9 int main(void)
     10 {
     11     if (-1 != accept(99, NULL, 0))
     12        printf("accept succeeded?\n");
     13 
     14     if (-1 != recvfrom(0, NULL, 0, 0, NULL, 0))
     15        printf("recvfrom succeeded?\n");
     16 
     17     if (-1 != getsockopt(0, 0, 0, NULL, 0))
     18        printf("getsockopt succeeded?\n");
     19 
     20     return 0;
     21 }
     22