[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#585618: [Mesa-dev] [PATCH 1/6] pipe: Detect FreeBSD better



On Thu, Jun 24, 2010 at 01:07:17 -0700, Corbin Simpson wrote:

> On Wed, Jun 23, 2010 at 6:31 PM, nobled <nobled@dreamwidth.org> wrote:
> > Taking advice from the Debian BSD porting guide:
> > http://glibc-bsd.alioth.debian.org/porting/PORTING
> >
> > This should help fix Debian bug #585618 (gallium build failure).
> > ---
> >  src/gallium/include/pipe/p_config.h |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > diff --git a/src/gallium/include/pipe/p_config.h
> > b/src/gallium/include/pipe/p_config.h
> > index b81702a..68025fa 100644
> > --- a/src/gallium/include/pipe/p_config.h
> > +++ b/src/gallium/include/pipe/p_config.h
> > @@ -128,7 +128,7 @@
> >  #define PIPE_OS_UNIX
> >  #endif
> >
> > -#if defined(__FreeBSD__)
> > +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
> >  #define PIPE_OS_FREEBSD
> >  #define PIPE_OS_BSD
> >  #define PIPE_OS_UNIX
> > --
> > 1.5.4.3
> 
> Looks reasonable; does this actually work for you? I'd like somebody
> to test first.
> 
I verified that this builds on a kfreebsd system on top of 7.8.2, and
looking at the differences between PIPE_OS_LINUX and PIPE_OS_{,FREE}BSD
in the code this seems reasonable, so
Reviewed-by: Julien Cristau <jcristau@debian.org>

Maybe also consider:

diff --git a/src/gallium/auxiliary/rtasm/rtasm_execmem.c b/src/gallium/auxiliary/rtasm/rtasm_execmem.c
index 65d5ce7..bd84532 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_execmem.c
+++ b/src/gallium/auxiliary/rtasm/rtasm_execmem.c
@@ -37,7 +37,7 @@
 
 #include "rtasm_execmem.h"
 
-#if defined(PIPE_OS_BSD)
+#ifndef MAP_ANONYMOUS
 #define MAP_ANONYMOUS MAP_ANON
 #endif
 

(the kfreebsd glibc headers define MAP_ANONYMOUS to MAP_ANON already, so
this one shouldn't be strictly necessary)

Cheers,
Julien

Attachment: signature.asc
Description: Digital signature


Reply to: