diff options
author | vanilla <vanilla@FreeBSD.org> | 2011-09-05 19:59:52 +0800 |
---|---|---|
committer | vanilla <vanilla@FreeBSD.org> | 2011-09-05 19:59:52 +0800 |
commit | 5965ed4803e0850b52fd30b651619b968836834b (patch) | |
tree | c8d78e34c991d0af780d29cff789bf08d14fff37 | |
parent | 531cf9a695231dee8a6bd7c67ef02ae30bcc4fea (diff) | |
download | freebsd-ports-gnome-5965ed4803e0850b52fd30b651619b968836834b.tar.gz freebsd-ports-gnome-5965ed4803e0850b52fd30b651619b968836834b.tar.zst freebsd-ports-gnome-5965ed4803e0850b52fd30b651619b968836834b.zip |
Fix build error with clang.
-rw-r--r-- | games/xflame/files/patch-xflame.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/games/xflame/files/patch-xflame.c b/games/xflame/files/patch-xflame.c new file mode 100644 index 000000000000..1d90a80622af --- /dev/null +++ b/games/xflame/files/patch-xflame.c @@ -0,0 +1,42 @@ +--- xflame.c.orig 1998-12-16 15:28:03.000000000 +0800 ++++ xflame.c 2011-09-05 14:57:44.000000000 +0800 +@@ -28,6 +28,8 @@ + + /* INCLUDES! */ + #include <stdio.h> ++#include <stdlib.h> ++#include <string.h> + #include <unistd.h> + #include <X11/Xlib.h> + #include <X11/Xutil.h> +@@ -452,18 +454,18 @@ int SetupXImage(struct globaldata *g,int + /*to the window, to speedup drawing, and give us Double Buffering */ + int hbits,hs; + int imsize; +- unsigned char *im; ++ unsigned char *im; + + hbits=powerof(w); + hs=(1<<hbits); + /* calculate the memory needed for the image data */ + imsize=hs*h*g->depth; + /* allocate the memory for the image data */ +- im=(char *)malloc(imsize); ++ im=(unsigned char *)malloc(imsize); + /* if we couldn't allocate the memory, return 0 */ + if (!im) return 0; + /* create the XImage from the data */ +- g->xim=XCreateImage(g->disp,g->vis,g->depth,ZPixmap,0,im,hs,h,32,0); ++ g->xim=XCreateImage(g->disp,g->vis,g->depth,ZPixmap,0,(char *)im,hs,h,32,0); + g->im=im; + g->ims=hbits; + XMapWindow(g->disp,g->win); +@@ -881,7 +883,7 @@ int Xflame(struct globaldata *g,int w, i + } + + /* Here's the MAIN part of the program */ +-void main(int argc, char **argv) ++int main(int argc, char **argv) + { + struct globaldata glob; + char disp[256],colorspec[256],title[80]; |