Tue 10 Nov 2009 04:49:18 PM UTC, original submission:
Version is 4.0.1; I chose "none" since it wasn't available from the drop down.
Error is a call to "setenv" with incorrect number of parameters.
"misc.c", line 693: prototype mismatch: 2 args passed, 3 expected
cc: acomp failed for misc.c
After an examination of the file, I found that the call to setenv was wrong for this environment.
A bit of web searching later, and I found a related fix for a previous version of screen.
The fix I found was at:
http://mail-index.netbsd.org/pkgsrc-bugs/2005/12/10/0000.html
Here's the error the submitter encountered, along with the fix:
-----------------
cc -c -I. -I. -O -xtarget=ultra2 -xarch=v8plusa misc.c
"misc.c", line 619: prototype mismatch: 2 args passed, 3 expected
cc: acomp failed for misc.c
>Fix:
# /usr/include/stdlib.h
183 #if defined(_EXTENSIONS_) || \
184 (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
185 defined(_XPG6)
186 extern int posix_openpt(int);
187 extern int setenv(const char , const char , int);
188 extern int unsetenv(const char *);
189 #endif
/usr/pkgsrc/misc/screen# cat patches/patch-aq
--- misc.c.orig Fri Dec 9 09:36:20 2005
+++ misc.c Fri Dec 9 09:40:23 2005
@@ -613,7 +613,9 @@
*/
# endif /* NEEDSETENV */
#else /* USESETENV */
-# if defined(linux) || defined(_convex_) || (BSD >= 199103)
+# if defined(linux) || defined(_convex_) || (BSD >= 199103) \
+ || defined(_EXTENSIONS_) || defined(_XPG6) \
+ || (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
setenv(var, value, 1);
# else
setenv(var, value);
cc: acomp failed for misc.c
--------------------------
And the relevant portion is:
-# if defined(linux) || defined(_convex_) || (BSD >= 199103)
+# if defined(linux) || defined(_convex_) || (BSD >= 199103) \
+ || defined(_EXTENSIONS_) || defined(_XPG6) \
+ || (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
That is, add two more lines of tests to the if the #if that determines which version of setenv the environment provides.
I made that change by hand at the appropriate location in my version of misc.c (around line 690 or so) and it built.
|