| ** Copyright 2002 University of Illinois Board of Trustees |
| ** Copyright 2002 Mark D. Roth |
| ** getservbyname_r.c - getservbyname_r() function for compatibility library |
| ** Mark D. Roth <roth@uiuc.edu> |
| ** Campus Information Technologies and Educational Services |
| ** University of Illinois at Urbana-Champaign |
| compat_getservbyname_r(const char *name, const char *proto, |
| struct servent *sp, char *buf, size_t buflen, |
| #if GETSERVBYNAME_R_NUM_ARGS == 5 |
| *spp = getservbyname_r(name, proto, sp, buf, buflen); |
| #elif GETSERVBYNAME_R_NUM_ARGS == 4 |
| struct servent_data sdata; |
| if (getservbyname_r(name, proto, sp, &sdata) == -1) |
| #endif /* GETSERVBYNAME_R_NUM_ARGS == 5 */ |