[Mesa-dev] [PATCH 3/5] compiler: define endian for FreeBSD

Greg V greg at unrelenting.technology
Thu Oct 26 14:42:46 UTC 2017


On 10/26/2017 17:07, Emil Velikov wrote:

> On 23 October 2017 at 21:20, Greg V <greg at unrelenting.technology> wrote:
>> Obtained from: FreeBSD ports
>> ---
>>   src/mesa/main/compiler.h | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h
>> index 43a06b4313..8652aac36c 100644
>> --- a/src/mesa/main/compiler.h
>> +++ b/src/mesa/main/compiler.h
>> @@ -51,6 +51,9 @@
>>   #if defined(__linux__)
>>   #include <byteswap.h>
>>   #define CPU_TO_LE32( x )       bswap_32( x )
>> +#elif defined(__FreeBSD__)
>> +#include <sys/endian.h>
>> +#define CPU_TO_LE32( x )       bswap32( x )
> Isn't this handled by the #else further down?
>
> #if defined(__linux__)
> ...
> #elif defined(__APPLE__)
> ...
> #elif defined(__OpenBSD__)
> ...
> #else /*__linux__ */
> #include <sys/endian.h>
> #define CPU_TO_LE32( x )        bswap32( x )
> #endif /*__linux__*/
>
> So unless FreeBSD defines __APPLE__ or __OpenBSD__ things should work
> w/o the patch?
>
> -Emil
Oh, sure. I blindly copy-pasted from ports :D We'll need to remove the 
patch there, ignore this one.


More information about the mesa-dev mailing list