summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/libugly/getservbyname.c
blob: f1c74eaa9d9407d00ee2fa0ed780d6578e9fbbd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#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;
}