[Pkg-xfce-devel] Bug#564651: Bug#564651: Bug#564651: xfce4-netload-plugin: FTBFS on kfreebsd-*: net/*.h: No such file or directory

Yves-Alexis Perez corsac at debian.org
Mon Jan 11 22:04:46 UTC 2010


On 11/01/2010 17:37, Petr Salinger wrote:
> 
> 
> On Mon, 11 Jan 2010, Cyril Brulebois wrote:
> 
>> Petr Salinger <Petr.Salinger at seznam.cz> (11/01/2010):
>>> For maintainable solution please use
>>>
>>> --- xfce4-netload-plugin-0.4.0.orig/panel-plugin/os.h
>>> +++ xfce4-netload-plugin-0.4.0/panel-plugin/os.h
>>> @@ -94,8 +94,10 @@
>>>  #include <net/if_media.h>
>>>  #include <net/if_mib.h>
>>>  #include <arpa/inet.h>
>>> +#if (__FreeBSD_kernel__ < 8) && (__FreeBSD__ < 8)
>>>  #include <net/ppp_defs.h>
>>>  #include <net/if_ppp.h>
>>> +#endif
>>>  #elif __NetBSD__            /* N E T B S D */
>>>  #include <stdio.h>
>>>  #include <sys/param.h>
>>
>> Didn't you forget the ˙˙version˙˙ part of the defines?
> 
> No, as it is sufficient to test major part.
> 
> #define __FreeBSD_kernel__ 8
> #define __FreeBSD_kernel_version 800107
> 
>> Not sure about the && part by the way.
> 
> You can assume that either __FreeBSD__ and __FreeBSD_kernel__ are
> both defined to the same value, or one of them is undefined
> (which is evaluated as 0). In this case value of defined one is important.
> 
> Generally our tests are in this form:
> 
> #if (__FreeBSD_kernel_version < 701000) && (__FreeBSD_version < 701000)
> /* code for old version of kernel */
> #endif
> 
> #if (__FreeBSD_kernel_version > 800100) || (__FreeBSD_version > 800100)
> /* code for new version of kernel */
> #endif
> 
> Petr
> 
[15:18:07] (KiBi): kibi at kbsd:~$ gcc -x c -E -dM /dev/null|grep FreeBSD
[15:18:07] (KiBi): #define __FreeBSD_kernel__ 1

So in the end, which patch is the right one?
-- 
Yves-Alexis

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-xfce-devel/attachments/20100111/754b0733/attachment.pgp>


More information about the Pkg-xfce-devel mailing list