Re: [flashrom] compiling flashrom for Debian/kFreeBSD
Am 25.02.2012 17:03 schrieb Carl-Daniel Hailfinger:
> Am 25.02.2012 11:46 schrieb Robert Millan:
>> El 25 de febrer de 2012 0:49, Carl-Daniel Hailfinger >> El 24 de
>> febrer de 2012 0:55, Carl-Daniel Hailfinger
>>>> <firstname.lastname@example.org> ha escrit:
>>>>> #include <machine/cpufunc.h>
>>>>> #define off64_t off_t
>>>>> #define lseek64 lseek
>>>> Actually, we have machine/cpufunc.h (we have everything in machine/*
>>>> actually). The off_t / lseek defines after this look dangerous though
>>>> (they collide with glibc definitions).
>>> Comment has been replaced with
>>> /* Note that FreeBSD kernel with glibc has conflicting out[bwl] definitions
>>> * in machine/cpufunc.h and sys/io.h. Use cpufunc.h only for plain FreeBSD.
>> Uhm no, we removed the conflicts. We need to allow programs to
>> include both headers painlessly. Again, just pick the one you prefer.
>> cpufunc.h is supposed to work, and if it doesn't it's a bug.
> Thanks for the info, I have adjusted the comment:
> /* Note that Debian/kFreeBSD (FreeBSD with glibc) machine/cpufunc.h
> contains out[bwl] definitions which are incompatible with FreeBSD
> machine/cpufunc.h. Use machine/cpufunc.h only for plain FreeBSD. */
> FreeBSD machine/cpufunc.h has outb(port,data).
> Linux/glibc sys/io.h has outb(data,port).
Thanks for your tests. The patch has been committed in r1507 to flashrom