Date: Thu, 15 Dec 2011 06:09:02 +1100 From: Jan Beich <jbeich@tormail.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/163293: [patch] net/lambdamoo: unbreak build with clang Message-ID: <1RauD3-00052B-Hl@internal.tormail.net> Resent-Message-ID: <201112141920.pBEJK8iK030503@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 163293 >Category: ports >Synopsis: [patch] net/lambdamoo: unbreak build with clang >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Dec 14 19:20:08 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Jan Beich >Release: FreeBSD 10.0-CURRENT amd64 >Organization: >Environment: >Description: >How-To-Repeat: http://pointyhat.freebsd.org/errorlogs/amd64-errorlogs/e.9-exp.20110723205754/lambdamoo-1.8.1_1.log $ echo 'int main(int argc, char *argv) { void *ptr; exit(0); }' | clang -xc - <stdin>:1:5: error: second parameter of 'main' (argument array) must be of type 'char **' int main(int argc, char *argv) { void *ptr; exit(0); } ^ <stdin>:1:45: warning: implicitly declaring C library function 'exit' with type 'void (int) __attribute__((noreturn))' int main(int argc, char *argv) { void *ptr; exit(0); } ^ <stdin>:1:45: note: please include the header <stdlib.h> or explicitly provide a declaration for 'exit' 1 warning and 1 error generated. >Fix: --- clang.diff begins here --- Index: net/lambdamoo/files/patch-configure =================================================================== RCS file: /a/.csup/ports/net/lambdamoo/files/patch-configure,v retrieving revision 1.1 diff -u -p -r1.1 patch-configure --- net/lambdamoo/files/patch-configure 9 Apr 2002 06:08:40 -0000 1.1 +++ net/lambdamoo/files/patch-configure 14 Dec 2011 18:52:42 -0000 @@ -1,5 +1,14 @@ --- configure.orig Mon Apr 8 22:32:10 2002 +++ configure Mon Apr 8 22:51:13 2002 +@@ -599,7 +599,7 @@ + cat > conftest.c <<EOF + #include "confdefs.h" + +-int main(int argc, char *argv) { void *ptr; exit(0); } ++int main(int argc, char **argv) { void *ptr; exit(0); } + + EOF + eval $compile @@ -1618,7 +1618,7 @@ do echo "checking whether $func is declared in sys/ioctl.h" Index: net/lambdamoo/files/patch-configure.in =================================================================== RCS file: /a/.csup/ports/net/lambdamoo/files/patch-configure.in,v retrieving revision 1.1 diff -u -p -r1.1 patch-configure.in --- net/lambdamoo/files/patch-configure.in 9 Apr 2002 06:08:40 -0000 1.1 +++ net/lambdamoo/files/patch-configure.in 14 Dec 2011 18:51:37 -0000 @@ -9,3 +9,12 @@ changequote([,])dnl AC_PROGRAM_EGREP($pattern, [ #include <$1> +@@ -260,7 +260,7 @@ + SAVECC="$CC" + CC="$CC $opt" + AC_TEST_PROGRAM([ +-int main(int argc, char *argv) { void *ptr; exit(0); } ++int main(int argc, char **argv) { void *ptr; exit(0); } + ], + [have_ansi=1 + break], --- clang.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1RauD3-00052B-Hl>