Bug 3811

Summary: xload and memleak (GNU/kFreeBSD support)
Product: xorg Reporter: Robert Millan <rmh>
Component: App/otherAssignee: Xorg Project Team <xorg-team>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: git   
Hardware: x86 (IA32)   
OS: other   
Whiteboard:
i915 platform: i915 features:

Description Robert Millan 2005-07-19 06:38:28 UTC
Fixes for xload and memleak to build on GNU/kFreeBSD.

(note: GNU/kFreeBSD has Glibc and a Linux-like /proc)

Index: programs/xload/get_load.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xload/get_load.c,v
retrieving revision 1.2
diff -u -r1.2 get_load.c
--- programs/xload/get_load.c   23 Apr 2004 19:54:57 -0000      1.2
+++ programs/xload/get_load.c   18 Jul 2005 19:17:46 -0000
@@ -406,7 +406,7 @@
 }
 #else /* not KVM_ROUTINES */
 
-#ifdef linux
+#if defined(linux) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
 
 void InitLoadPoint()
 {
Index: util/memleak/Imakefile
===================================================================
RCS file: /cvs/xorg/xc/util/memleak/Imakefile,v
retrieving revision 1.2
diff -u -r1.2 Imakefile
--- util/memleak/Imakefile      23 Apr 2004 19:55:10 -0000      1.2
+++ util/memleak/Imakefile      18 Jul 2005 19:17:46 -0000
@@ -42,7 +42,7 @@
 GRA_SRCS = getreti386.c stackbottom.c
 #endif
 
-#ifdef LinuxArchitecture
+#if defined(LinuxArchitecture) || defined(__GLIBC__)
 #ifdef i386Architecture
 #define HasGetReturnAddress    YES
 #define TopOfStack 0xbffff800
Comment 1 Alan Coopersmith 2005-10-02 14:18:59 UTC
Fixes committed to CVS head - should be included in Xorg 6.9 RC 1 release.
Thanks for the patch!

CVSROOT:	/cvs/xorg
Module name:	xc
Changes by:	alanc@gabe.freedesktop.org	05/10/02 14:17:48

Log message:
  2005-10-02  Alan Coopersmith  <alan.coopersmith@sun.com>
  
  	* programs/xload/get_load.c:
  	* util/memleak/Imakefile:
  	Bug #3811 <https://bugs.freedesktop.org/show_bug.cgi?id=3811>
  	GNU/kFreeBSD support for xload & memleak (Robert Millan)

Modified files:
      ./:
        ChangeLog 
      xc/programs/xload/:
        get_load.c 
      xc/util/memleak/:
        Imakefile 
  
  Revision      Changes    Path
  1.1367        +7 -0      xc/ChangeLog
  http://cvs.freedesktop.org/xorg/xc/ChangeLog
  1.4           +1 -1      xc/programs/xload/get_load.c
  http://cvs.freedesktop.org/xorg/xc/programs/xload/get_load.c
  1.3           +1 -1      xc/util/memleak/Imakefile
  http://cvs.freedesktop.org/xorg/xc/util/memleak/Imakefile

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.