patch 9.0.0978: build errors without the +channel feature

Problem:    Build errors without the +channel feature. (John Marriott)
Solution:   Adjust #ifdefs.
diff --git a/src/typval.c b/src/typval.c
index a445bf8..b1a0060 100644
--- a/src/typval.c
+++ b/src/typval.c
@@ -619,6 +619,16 @@
     return (args[idx].v_type == VAR_UNKNOWN
 	    || check_for_job_arg(args, idx) != FAIL) ? OK : FAIL;
 }
+#else
+/*
+ * Give an error and return FAIL unless "args[idx]" is an optional channel or a
+ * job.  Used without the +channel feature, thus only VAR_UNKNOWN is accepted.
+ */
+    int
+check_for_opt_chan_or_job_arg(typval_T *args, int idx)
+{
+    return args[idx].v_type == VAR_UNKNOWN ? OK : FAIL;
+}
 #endif
 
 /*