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

Re: Bug#632499: redis: FTBFS (kfreebsd): needs small adjustment



Hi!

Chris Lamb <lamby@debian.org> writes:
> Chris Lamb wrote:
>> > redis won't build without _XOPEN_SOURCE set to 700,
>
> I decided to apply your patch locally, but it actually breaks compilation on
> my linux-amd64 box. As a reminder, your patch was:
>
>   --- redis-2.2.11.orig/src/fmacros.h
>   +++ redis-2.2.11/src/fmacros.h
>   @@ -3,7 +3,7 @@
>  
>    #define _BSD_SOURCE
>  
>   -#ifdef __linux__
>   +#ifdef __GLIBC__
>    #define _XOPEN_SOURCE 700
>    #else
>    #define _XOPEN_SOURCE
>
> However, __GLIBC__ doesn't seem to be defined (so it only defines
> _XOPEN_SOURCE).
>
> Including <features.h> sets __GLIBC__ but then other things break. I'm sure
> you can fix this faster than me so passing this back for now.

hum right. Making that a 

--- redis-2.2.11.orig/src/fmacros.h
+++ redis-2.2.11/src/fmacros.h
@@ -3,7 +3,7 @@

 #define _BSD_SOURCE

-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD_kernel__)
 #define _XOPEN_SOURCE 700
 #else
 #define _XOPEN_SOURCE

will work.

Regards

    Christoph
-- 
9FED 5C6C E206 B70A 5857  70CA 9655 22B9 D49A E731
Debian Developer | Lisp Hacker | CaCert Assurer

A. Because it breaks the logical sequence of discussion
Q. Why is top posting bad?


Reply to: