Index: testsuites/psxtests/Makefile.am
===================================================================
--- testsuites/psxtests/Makefile.am	(revision add0b6a3f5cd7638285aeb5f6132aee20af9ca70)
+++ testsuites/psxtests/Makefile.am	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -1580,5 +1580,28 @@
 	psxhdrs/inttypes/strtoumax.c \
 	psxhdrs/inttypes/wcstoimax.c \
-	psxhdrs/inttypes/wcstoumax.c
+	psxhdrs/inttypes/wcstoumax.c \
+	psxhdrs/netdb/endhostent.c \
+	psxhdrs/netdb/endnetent.c \
+	psxhdrs/netdb/endprotoent.c \
+	psxhdrs/netdb/endservent.c \
+	psxhdrs/netdb/sethostent.c \
+	psxhdrs/netdb/setnetent.c \
+	psxhdrs/netdb/setservent.c \
+	psxhdrs/netdb/gethostent.c \
+	psxhdrs/netdb/getprotoent.c \
+	psxhdrs/netdb/getnetent.c \
+	psxhdrs/netdb/getservent.c \
+	psxhdrs/netdb/freeaddrinfo.c \
+	psxhdrs/netdb/gai_strerror.c \
+	psxhdrs/netdb/getaddrinfo.c \
+	psxhdrs/netdb/gethostbyaddr.c \
+	psxhdrs/netdb/gethostbyname.c \
+	psxhdrs/netdb/getnameinfo.c \
+	psxhdrs/netdb/getnetbyname.c \
+	psxhdrs/netdb/getprotobyname.c \
+	psxhdrs/netdb/getprotobynumber.c \
+	psxhdrs/netdb/getservbyname.c \
+	psxhdrs/netdb/getservbyport.c \
+	psxhdrs/netdb/h_errno.c
 
 
Index: testsuites/psxtests/psxhdrs/netdb/endhostent.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/endhostent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/endhostent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief endhostent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <sys/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct hostent *host;
+
+   host = gethostent();
+   sethostent( 1 );
+   endhostent();
+
+   return ( host != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/endnetent.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/endnetent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/endnetent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief endnetent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct netent *nent;
+
+   nent = getnetent();
+   setnetent( 1 );
+   endnetent();
+
+   return ( nent != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/endprotoent.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/endprotoent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/endprotoent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief endprotoent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct protoent *protoc;
+
+   protoc = getprotoent();
+   setprotoent( 1 );
+   endprotoent();
+
+   return ( protoc != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/endservent.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/endservent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/endservent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief endservent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <sys/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct servent *serv;
+
+   serv = getservent();
+   setservent( 1 );
+   endservent();
+
+   return ( serv != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/freeaddrinfo.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/freeaddrinfo.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/freeaddrinfo.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,50 @@
+/**
+ *  @file
+ *  @brief freeaddrinfo() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct addrinfo hints;
+   struct addrinfo *finfo = (void *)0;
+   int result;
+
+   hints.ai_family = AF_UNSPEC;    /* Allow IPv4 or IPv6 */
+   hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */
+   hints.ai_flags = AI_PASSIVE;    /* For wildcard IP address */
+   hints.ai_protocol = 0;          /* Any protocol */
+   hints.ai_canonname = (void *)0;
+   hints.ai_addr = (void *)0;
+   hints.ai_next = (void *)0;
+
+   result = getaddrinfo( (void *)0, (void *)0, &hints, &finfo );
+   freeaddrinfo( finfo );
+
+   return result;
+ }
Index: testsuites/psxtests/psxhdrs/netdb/gai_strerror.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/gai_strerror.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/gai_strerror.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief gai_strerror() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   int ecode = 2;
+   const char *result;
+
+   result = gai_strerror( ecode );
+
+   return ( result != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/getaddrinfo.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/getaddrinfo.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/getaddrinfo.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,49 @@
+/**
+ *  @file
+ *  @brief getaddrinfo() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct addrinfo hints;
+   struct addrinfo *finfo = (void *)0;
+   int result;
+
+   hints.ai_family = AF_UNSPEC;    /* Allow IPv4 or IPv6 */
+   hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */
+   hints.ai_flags = AI_PASSIVE;    /* For wildcard IP address */
+   hints.ai_protocol = 0;          /* Any protocol */
+   hints.ai_canonname = (void *)0;
+   hints.ai_addr = (void *)0;
+   hints.ai_next = (void *)0;
+
+   result = getaddrinfo( (void *)0, (void *)0, &hints, &finfo );
+
+   return result;
+ }
Index: testsuites/psxtests/psxhdrs/netdb/gethostbyaddr.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/gethostbyaddr.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/gethostbyaddr.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief gethostbyaddr() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <arpa/inet.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct hostent *host;
+   struct in_addr ipv4addr;
+
+   host = gethostbyaddr( &ipv4addr, sizeof(ipv4addr), AF_INET );
+
+   return ( host != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/gethostbyname.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/gethostbyname.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/gethostbyname.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief gethostbyname() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <sys/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct hostent *host;
+   char *name = (void *)0;
+
+   host = gethostbyname( name );
+
+   return ( host != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/gethostent.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/gethostent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/gethostent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,38 @@
+/**
+ *  @file
+ *  @brief getservent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <sys/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct servent *serv;
+
+   serv = getservent();
+
+   return ( serv != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/getnameinfo.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/getnameinfo.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/getnameinfo.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,49 @@
+/**
+ *  @file
+ *  @brief getnameinfo() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <sys/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct sockaddr sa;
+   char host[1024];
+   char service[20];
+   int result;
+
+   sa.sa_family      = AF_INET;
+
+   result = getnameinfo( &sa,
+                        sizeof(sa),
+                        host,
+                        sizeof(host),
+                        service,
+                        sizeof(service),
+                        0 );
+
+   return result;
+ }
Index: testsuites/psxtests/psxhdrs/netdb/getnetbyaddr.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/getnetbyaddr.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/getnetbyaddr.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief getnetbyaddr() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct netent *gnet;
+   uint32_t net = 2;
+   int type = 2;
+
+   gnet = getnetbyaddr( net, type );
+
+   return ( gnet != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/getnetbyname.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/getnetbyname.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/getnetbyname.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief getnetbyname() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct netent *gnet;
+   char *name = "ipv4";
+
+   gnet = getnetbyname( name );
+   (void) name;
+
+   return ( gnet != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/getnetent.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/getnetent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/getnetent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,37 @@
+/**
+ *  @file
+ *  @brief getnetent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct netent *nent;
+
+   nent = getnetent();
+
+   return ( nent != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/getprotobyname.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/getprotobyname.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/getprotobyname.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief getprotobyname() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct protoent *pnet;
+   char *name = "ipv4";
+
+   pnet = getprotobyname( name );
+   (void) name;
+
+   return ( pnet != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/getprotobynumber.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/getprotobynumber.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/getprotobynumber.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,38 @@
+/**
+ *  @file
+ *  @brief getprotobynumber() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct protoent *pnet;
+   int proto = 2;
+
+   pnet = getprotobynumber( proto );
+
+   return ( pnet != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/getprotoent.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/getprotoent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/getprotoent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,37 @@
+/**
+ *  @file
+ *  @brief getprotoent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct protoent *protoc;
+
+   protoc = getprotoent();
+
+   return ( protoc != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/getservbyname.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/getservbyname.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/getservbyname.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief getservbyname() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct servent *pserv;
+   char *name = "ip";
+   char *proto = "ipv4";
+
+   pserv = getservbyname( name, proto );
+
+   return ( pserv != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/getservbyport.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/getservbyport.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/getservbyport.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief getservbyport() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct servent *pserv;
+   int port = 2;
+   char *proto = "ipv4";
+
+   pserv = getservbyport( port, proto );
+
+   return ( pserv != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/getservent.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/getservent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/getservent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,38 @@
+/**
+ *  @file
+ *  @brief getservent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <sys/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct servent *serv;
+
+   serv = getservent();
+
+   return ( serv != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/h_errno.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/h_errno.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/h_errno.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief h_errno() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <sys/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct hostent *host;
+
+   host = gethostent();
+   sethostent( h_errno );
+
+   return ( host != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/sethostent.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/sethostent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/sethostent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief sethostent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <sys/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct hostent *host;
+
+   host = gethostent();
+   sethostent( 1 );
+
+   return ( host != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/setnetent.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/setnetent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/setnetent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,38 @@
+/**
+ *  @file
+ *  @brief setnetent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct netent *nent;
+
+   nent = getnetent();
+   setnetent( 1 );
+
+   return ( nent != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/setprotoent.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/setprotoent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/setprotoent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,38 @@
+/**
+ *  @file
+ *  @brief setprotoent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct protoent *protoc;
+
+   protoc = getprotoent();
+   setprotoent( 1 );
+
+   return ( protoc != (void *)0 );
+ }
Index: testsuites/psxtests/psxhdrs/netdb/setservent.c
===================================================================
--- testsuites/psxtests/psxhdrs/netdb/setservent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
+++ testsuites/psxtests/psxhdrs/netdb/setservent.c	(revision aad6551b5efd639fbdbc85274555427c68960739)
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief setservent() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
+
+ #include <sys/socket.h>
+ #include <netdb.h>
+
+ int test( void );
+
+ int test( void )
+ {
+   struct servent *serv;
+
+   serv = getservent();
+   setservent( 1 );
+
+   return ( serv != (void *)0 );
+ }
