From 545d4a79b50caa5698622c0c1905ae154197a16f Mon Sep 17 00:00:00 2001
From: Yi Zhao <yi.zhao@windriver.com>
Date: Fri, 12 Oct 2018 12:38:02 +0800
Subject: [PATCH] makedefs: add -lnsl and -lresolv to SYSLIBS by default

We don't need to check libnsl.so and libresolv.so since the libnsl2 is
specified in DEPENDS and libresolv.so is from c libarary.

Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
 makedefs | 22 ++--------------------
 1 file changed, 2 insertions(+), 20 deletions(-)

diff --git a/makedefs b/makedefs
index 2a76f20..9d5db9f 100644
--- a/makedefs
+++ b/makedefs
@@ -506,16 +506,7 @@ case "$SYSTEM.$RELEASE" in
 		    SYSLIBS="$SYSLIBS -ldb"
 		    ;;
 		esac
-		for name in nsl resolv $GDBM_LIBS
-		do
-		    for lib in $BUILD_SYSROOT_NSL_PATH
-		    do
-			test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
-			    SYSLIBS="$SYSLIBS -l$name"
-			    break
-			}
-		    done
-		done
+		SYSLIBS="$SYSLIBS -lnsl -lresolv"
 		# Kernel 2.4 added IPv6
 		case "$RELEASE" in
 		2.[0-3].*) CCARGS="$CCARGS -DNO_IPV6";;
@@ -583,16 +574,7 @@ EOF
 		    SYSLIBS="$SYSLIBS -ldb"
 		    ;;
 		esac
-		for name in nsl resolv
-		do
-		    for lib in $BUILD_SYSROOT_NSL_PATH
-		    do
-			test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
-			    SYSLIBS="$SYSLIBS -l$name"
-			    break
-			}
-		    done
-		done
+		SYSLIBS="$SYSLIBS -lnsl -lresolv"
 		SYSLIBS="$SYSLIBS -ldl"
 		: ${SHLIB_SUFFIX=.so}
 		: ${SHLIB_CFLAGS=-fPIC}
-- 
2.17.1

