mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-27 15:30:07 +00:00
25 lines
467 B
C
25 lines
467 B
C
|
#include <stdio.h>
|
||
|
#include <string.h>
|
||
|
#include <arpa/inet.h>
|
||
|
#include <netinet/in.h>
|
||
|
#include <rpc/clnt.h>
|
||
|
|
||
|
|
||
|
static int
|
||
|
do_test (void)
|
||
|
{
|
||
|
struct sockaddr_in ad;
|
||
|
struct sockaddr_in ad2;
|
||
|
memset (&ad, '\0', sizeof (ad));
|
||
|
memset (&ad2, '\0', sizeof (ad2));
|
||
|
|
||
|
get_myaddress (&ad);
|
||
|
|
||
|
printf ("addr = %s:%d\n", inet_ntoa (ad.sin_addr), ad.sin_port);
|
||
|
|
||
|
return memcmp (&ad, &ad2, sizeof (ad)) == 0;
|
||
|
}
|
||
|
|
||
|
#define TEST_FUNCTION do_test ()
|
||
|
#include "../test-skeleton.c"
|