From nobody@FreeBSD.org  Sun Mar 22 23:19:36 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2B9B4106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 22 Mar 2009 23:19:36 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 1A6758FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 22 Mar 2009 23:19:36 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n2MNJZrs018583
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 22 Mar 2009 23:19:35 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n2MNJZNI018582;
	Sun, 22 Mar 2009 23:19:35 GMT
	(envelope-from nobody)
Message-Id: <200903222319.n2MNJZNI018582@www.freebsd.org>
Date: Sun, 22 Mar 2009 23:19:35 GMT
From: billy <markslashbill@yahoo.co.uk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: xlife segments on amd64 - patch supplied 
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         132949
>Category:       ports
>Synopsis:       games/xlife segments on amd64 - patch supplied
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 22 23:20:01 UTC 2009
>Closed-Date:    Tue Mar 24 12:04:27 UTC 2009
>Last-Modified:  Tue Mar 24 12:10:02 UTC 2009
>Originator:     billy
>Release:        amd 7.1
>Organization:
>Environment:
FreeBSD foghorn 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan  1 08:58:24 UTC 2009     root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
segmentation fault running xlife on amd64.

/usr/ports/games/xlife


cause:
===================================
in main.c use of 'getenv()' with no 
#include <stdlib.h>

there is a warning anyway...

main.c:66: warning: passing argument 1 of 'XOpenDisplay' makes pointer from integer without a cast

>How-To-Repeat:
try on amd64
it works ok on my P4

>Fix:
patch enclosed

Patch attached with submission follows:

*** main.c.orig	Mon Mar 23 00:13:37 2009
--- main.c	Mon Mar 23 00:14:16 2009
***************
*** 31,36 ****
--- 31,37 ----
  #include <X11/Xatom.h>
  
  #include <stdio.h>
+ #include <stdlib.h>
  
  #include "defs.h"
  #include "icon.h"


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Tue Mar 24 12:01:18 UTC 2009 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132949 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/132949: commit references a PR
Date: Tue, 24 Mar 2009 12:05:36 +0000 (UTC)

 pav         2009-03-24 12:04:16 UTC
 
   FreeBSD ports repository
 
   Modified files:
     games/xlife          Makefile 
   Added files:
     games/xlife/files    patch-main.c 
   Log:
   - Fix runtime on amd64
   
   PR:             ports/132949
   Submitted by:   billy <markslashbill@yahoo.co.uk>
   
   Revision  Changes    Path
   1.23      +1 -1      ports/games/xlife/Makefile
   1.1       +10 -0     ports/games/xlife/files/patch-main.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
