pantry/projects/github.com/thkukuk/libnsl/test.c
Andrii Riabchenko 47ff78a6bd new file: projects/github.com/thkukuk/libnsl/package.yml
new file:   projects/github.com/thkukuk/libnsl/test.c
2023-10-07 16:48:30 -04:00

17 lines
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;
}
}