[flashrom] compiling flashrom for Debian/kFreeBSD

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Sat Feb 25 17:03:26 CET 2012


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
>>> <c-d.hailfinger.devel.2006 at gmx.net> 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. */

Background:
FreeBSD machine/cpufunc.h has outb(port,data).
Linux/glibc sys/io.h has outb(data,port).

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the flashrom mailing list