Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Sep 2002 12:11:25 -0500
From:      Patrick Hartling <patrick@137.org>
To:        gnome@FreeBSD.org
Subject:   Fix for building Mono on -current
Message-ID:  <3D7E27BD.1030708@137.org>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------050200040409030104070402
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

The attached patch gets Mono 0.13 (and 0.15) to build on -current.  The 
problem isn't with the compiler but with FreeBSD 4.x not defining ELFMAG 
in its sys/elf_common.h.  ELFMAG was added to sys/elf_common.h in 
-current September 8, 2001, and the __FreeBSD_version value tested in the 
patch was bumped September 14, 2001 (Revision 1.102).

  -Patrick


-- 
Patrick L. Hartling			| Research Assistant, VRAC
patrick@137.org 
			| 2274 Howe Hall Room 2624
PGP: http://www.137.org/patrick/pgp.txt	| T: +1.515.294.4916
http://www.137.org/patrick/ 
	| http://www.vrac.iastate.edu/

--------------050200040409030104070402
Content-Type: text/plain;
 name="mono.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="mono.patch"

*** mono/metadata/debug-symfile.c.bak	Mon Jul  8 19:49:49 2002
--- mono/metadata/debug-symfile.c	Tue Sep 10 11:49:31 2002
***************
*** 2,7 ****
--- 2,8 ----
  #include <stdlib.h>
  #include <string.h>
  #include <signal.h>
+ #include <sys/param.h>
  #include <mono/metadata/metadata.h>
  #include <mono/metadata/rawbuffer.h>
  #include <mono/metadata/tokentype.h>
***************
*** 165,171 ****
  get_sections (MonoDebugSymbolFile *symfile, gboolean emit_warnings)
  {
  #ifdef HAVE_ELF_H
! #ifdef __FreeBSD__
  	static const char ELFMAG[] = { ELFMAG0, ELFMAG1, ELFMAG2, ELFMAG3, 0 };
  #endif
  	if (!strncmp (symfile->raw_contents, ELFMAG, strlen (ELFMAG)))
--- 166,172 ----
  get_sections (MonoDebugSymbolFile *symfile, gboolean emit_warnings)
  {
  #ifdef HAVE_ELF_H
! #if defined(__FreeBSD__) && __FreeBSD_version < 500023
  	static const char ELFMAG[] = { ELFMAG0, ELFMAG1, ELFMAG2, ELFMAG3, 0 };
  #endif
  	if (!strncmp (symfile->raw_contents, ELFMAG, strlen (ELFMAG)))

--------------050200040409030104070402--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-gnome" in the body of the message




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