net: Disable building tst_get_unused_port in old API

Commit fa6a4e708 moved tst_get_unused_port into new API, but left code
in Makefile built it also for old API. It was up to make which of these
was copied last and remain installed.

Also remove comparison for tst_get_unused_port from ltpapicmd.c.

Fixes: fa6a4e708 ("net: Introduce TST_GET_UNUSED_PORT() macro into C API")

Acked-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
(cherry picked from commit 6dc7c34156c26e2902a30816df2defccb1553f7c)
Change-Id: I95efa795ad8b09571341082b26d39e28bf33c673
Signed-off-by: Steve Muckle <smuckle@google.com>
diff --git a/tools/apicmds/Makefile b/tools/apicmds/Makefile
index 11763e2..4b2a604 100644
--- a/tools/apicmds/Makefile
+++ b/tools/apicmds/Makefile
@@ -28,7 +28,7 @@
 
 MAKE_TARGETS		:= $(addprefix tst_,brk brkm exit \
 			     res resm ncpus ncpus_conf ncpus_max \
-			     get_unused_port fs_has_free)
+			     fs_has_free)
 
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
 
diff --git a/tools/apicmds/ltpapicmd.c b/tools/apicmds/ltpapicmd.c
index f7e2a5e..c4fab32 100644
--- a/tools/apicmds/ltpapicmd.c
+++ b/tools/apicmds/ltpapicmd.c
@@ -262,8 +262,7 @@
 	tst_total = getenv("TST_TOTAL");
 	tst_cntstr = getenv("TST_COUNT");
 	if (TCID == NULL || tst_total == NULL || tst_cntstr == NULL) {
-		 if(!strcmp(cmd_name, "tst_fs_has_free") &&
-		    !strcmp(cmd_name, "tst_get_unused_port")) {
+		 if(!strcmp(cmd_name, "tst_fs_has_free")) {
 			fprintf(stderr,
 				"\nSet variables TCID, TST_TOTAL, and TST_COUNT before each test:\n"
 				"export TCID=<test name>\n"