$FreeBSD: ports/audio/cam/Makefile,v 1.14 2005/04/19 08:51:43 vs Exp $ clang -O2 -pipe -fno-strict-aliasing -c cam.c cam.c:29:1: error: 'main' must return 'int' void main(int argc, char *argv[]) ^ cam.c:40:6: warning: implicitly declaring C library function 'exit' with type 'void (int) __attribute__((noreturn))' exit(0); ^ cam.c:40:6: note: please include the header <stdlib.h> or explicitly provide a declaration for 'exit' 1 warning and 1 error generated. *** Error code 1 Fix: Patch attached with submission follows:
Are you building with -Werror or something? I tried building the port with clang and these errors were only warnings here.
Raphael Kubo da Costa <rakuco@FreeBSD.org> writes: > Are you building with -Werror or something? I tried building the port > with clang and these errors were only warnings here. The error is specific to clang-3.0 on 9.0R. It doesn't happen on clang-3.1 present in /stable/9 (also lang/clang) and clang-3.2 present in /head (also lang/clang-devel). http://pointyhat-west.isc.freebsd.org/errorlogs/amd64-errorlogs/e.9-exp-clang.20120902011351.pointyhat-west/cam-1.02.log
Responsible Changed From-To: freebsd-ports-bugs->rakuco OK, thanks for the information. Will commit it now.
State Changed From-To: open->closed Committed. Thanks!
Author: rakuco Date: Sun Sep 23 18:35:49 2012 New Revision: 304761 URL: http://svn.freebsd.org/changeset/ports/304761 Log: Fix the build with clang 3.0 from 9.0-RELEASE. See [1] for the build log, more recent clang versions already work fine. [1] http://pointyhat-west.isc.freebsd.org/errorlogs/amd64-errorlogs/e.9-exp-clang.20120902011351.pointyhat-west/cam-1.02.log PR: ports/171266 Submitted by: Pawel Worach <pawel.worach@gmail.com> Added: head/audio/cam/files/patch-cam.c (contents, props changed) Added: head/audio/cam/files/patch-cam.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/cam/files/patch-cam.c Sun Sep 23 18:35:49 2012 (r304761) @@ -0,0 +1,14 @@ +--- cam.c.orig 2012-09-03 00:31:15.000000000 +0200 ++++ cam.c 2012-09-03 00:31:42.000000000 +0200 +@@ -24,9 +24,10 @@ + + + ++#include <stdlib.h> + #include "cam.h" + +-void main(int argc, char *argv[]) ++int main(int argc, char *argv[]) + { + if (argc == 1) + { \ No newline at end of file _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"