Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Sep 2012 22:39:46 GMT
From:      Pawel Worach <pawel.worach@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/171266: [patch] fix build of audio/cam with clang
Message-ID:  <201209022239.q82Mdk3l011548@red.freebsd.org>
Resent-Message-ID: <201209022240.q82Me4nB001481@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         171266
>Category:       ports
>Synopsis:       [patch] fix build of audio/cam 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:   Sun Sep 02 22:40:04 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Pawel Worach
>Release:        FreeBSD 10.0-CURRENT
>Organization:
>Environment:
>Description:
$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
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -urN cam.orig/files/patch-cam.c cam/files/patch-cam.c
--- cam.orig/files/patch-cam.c	1970-01-01 01:00:00.000000000 +0100
+++ cam/files/patch-cam.c	2012-09-03 00:31:57.000000000 +0200
@@ -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)
+   {   


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209022239.q82Mdk3l011548>