When compiling sane-1.0.3 for sparc (32) one of the source files (sanei/sanei_ab306.c) includes asm/io.h, which in turn includes
asm-sparc/io.h. One of the inlines in asm-sparc/io.h is mapioaddr and it references sparc_cpu_model. This reference is *not* contained within
an #ifdef __KERNEL__/#endif pair. However, in asm-sparc/system.h, the definition of sparc_cpu_model *is* protected by #ifdef __KERNEL__
and is thus, unavailable for asm-sparc/io.h to use.
Under sparc64, the sparc_cpu_model definition is *not* protected, so things work fine for folks who are fortunate enough to have Ultras!
The definitions should be consistent, either protect under sparc64 or un-protect in sparc32.
Any program using asm/io.h in userland programs on Sparc needs to be fixed.
Nothing which happens in that header file is appropriate for userland at all,
I/O is done via mmap() of a device and the macros in io.h on Sparc would
not work outside of the kernel.
I'll fix the kernel headers, but SANE needs to be fixed here instead.
I think SANE will be fine once the declarations are straightened out. I don't
believe that SANE actually uses "bad" stuff from the file, but we'll see after