diff options
Diffstat (limited to 'mdk-stage1/dietlibc/libugly/getprotobyname.c')
-rw-r--r-- | mdk-stage1/dietlibc/libugly/getprotobyname.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mdk-stage1/dietlibc/libugly/getprotobyname.c b/mdk-stage1/dietlibc/libugly/getprotobyname.c new file mode 100644 index 000000000..1de348791 --- /dev/null +++ b/mdk-stage1/dietlibc/libugly/getprotobyname.c @@ -0,0 +1,12 @@ +#include <string.h> +#include <netdb.h> + +extern struct protoent __protoent_pw; +extern char __protoent_buf[1000]; + +struct protoent *getprotobyname(const char *name) { + struct protoent* tmp; + if (getprotobyname_r(name,&__protoent_pw,__protoent_buf,sizeof(__protoent_buf),&tmp)==0) + return tmp; + return 0; +} |