mirror of
https://github.com/ivabus/pantry
synced 2024-11-15 04:55:08 +03:00
47ff78a6bd
new file: projects/github.com/thkukuk/libnsl/test.c
17 lines
No EOL
389 B
C
17 lines
No EOL
389 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <rpcsvc/ypclnt.h>
|
|
|
|
int main(int argc, char *argv[]) {
|
|
char *domain;
|
|
switch (yp_get_default_domain(&domain)) {
|
|
case YPERR_SUCCESS:
|
|
printf("Domain: %s\n", domain);
|
|
return 0;
|
|
case YPERR_NODOM:
|
|
printf("No domain\n");
|
|
return 0;
|
|
default:
|
|
return 1;
|
|
}
|
|
} |