File:  [DVB] / dietlibc / libugly / getservbyname.c
Revision 1.1: download - view: text, annotated - select for diffs
Wed Oct 24 17:06:04 2001 UTC (22 years, 7 months ago) by fefe
Branches: MAIN
CVS tags: finnland_test_200301, branch_rc14_fieldtest_finnland, branch_rc13_fieldtest_finnland, branch_rc12_fieldtest_finnland, branch_rc10_fieldtest_finnland, RELEASE_finnland_200301_1, RC12_FIELDTEST_FINNLAND, RC10_FIELDTEST_FINNLAND, HEAD
rewrite getserv*, provide ..._r versions.

#include <string.h>
#include <netdb.h>

extern struct servent __servent_pw;
extern char __servent_buf[1000];

struct servent *getservbyname(const char *name, const char *proto) {
  struct servent* tmp;
  if (getservbyname_r(name,proto,&__servent_pw,__servent_buf,sizeof(__servent_buf),&tmp)==0)
    return tmp;
  return 0;
}

LinuxTV legacy CVS <linuxtv.org/cvs>