ports/161117: [patch] games/sl fix build under clang
Klaus Aehlig
aehlig at linta.de
Thu Sep 29 03:40:09 UTC 2011
>Number: 161117
>Category: ports
>Synopsis: [patch] games/sl fix build under 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: Thu Sep 29 03:40:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Klaus Aehlig
>Release: FreeBSD 8.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD curry.linta.de 8.2-STABLE FreeBSD 8.2-STABLE #14: Wed Sep 28 23:31:53 BST 2011 root at curry.linta.de:/usr/obj/usr/src/sys/CURRY amd64
>Description:
games/sl fails to build with CC=clang
>How-To-Repeat:
cd /usr/ports/games/sl && make build CC=clang
>Fix:
put the following patch in the files subdirectory (the latter has to be created)
This patches also fixes the clang compiler warnings.
--- patch-sl.c begins here ---
--- sl.c.orig 1998-07-22 15:01:01.000000000 +0100
+++ sl.c 2011-09-29 03:59:40.000000000 +0100
@@ -32,6 +32,11 @@
#include <unistd.h>
#include "sl.h"
+void add_man(int, int);
+int add_D51(int);
+int add_sl(int);
+void add_smoke(int,int);
+
int ACCIDENT = 0;
int LOGO = 0;
int FLY = 0;
@@ -59,7 +64,7 @@
}
}
-void main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
int x, i;
@@ -85,6 +90,8 @@
}
mvcur(0, COLS - 1, LINES - 1, 0);
endwin();
+
+ return 0;
}
@@ -129,7 +136,7 @@
}
-add_D51(int x)
+int add_D51(int x)
{
static char *d51[D51PATTERNS][D51HIGHT + 1]
= {{D51STR1, D51STR2, D51STR3, D51STR4, D51STR5, D51STR6, D51STR7,
@@ -170,7 +177,7 @@
}
-int add_man(int y, int x)
+void add_man(int y, int x)
{
static char *man[2][2] = {{"", "(O)"}, {"Help!", "\\O/"}};
int i;
@@ -181,7 +188,7 @@
}
-int add_smoke(int y, int x)
+void add_smoke(int y, int x)
#define SMOKEPTNS 16
{
static struct smokes {
--- patch-sl.c ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list