How do I find endian-conversion function on Redhar/Fedora

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday February 5, ritchiem@xxxxxxx wrote:
> 
> I tried to compile 2.3 but I get this error:
> 
> $make
> gcc -Wall -Werror -Wstrict-prototypes -DCONFFILE=\"/etc/mdadm.conf\" - 
> ggdb -DSendmail=\""/usr/sbin/sendmail -t"\"   -c -o super0.o super0.c
> In file included from super0.c:31:
> /usr/include/asm/byteorder.h:6:2: error: #warning using private  
> kernel header; include <endian.h> instead!
> make: *** [super0.o] Error 1
..
... including endian.h instead of byteorder.h ...
> 
> $make
> gcc -Wall -Werror -Wstrict-prototypes -DCONFFILE=\"/etc/mdadm.conf\" - 
> ggdb -DSendmail=\""/usr/sbin/sendmail -t"\"   -c -o super0.o super0.c
> cc1: warnings being treated as errors
> super0.c: In function ‘add_internal_bitmap0’:
> super0.c:737: warning: implicit declaration of function ‘__cpu_to_le32’
> super0.c:742: warning: implicit declaration of function ‘__cpu_to_le64’
> make: *** [super0.o] Error 1

This is starting to really annoy me, and probably bother other people
to.

mdadm needs functions to convert 16, 32, and 64 bit values between
host-endian and little-endian.  The standard 'C' library doesn't seem
to provide any.
The linux-kernel headers provide __cpu_to_leXX and __leXX_to_cpu, so I
use them.  But Redhat/Fedora seem to take this as an affront to the
rightness of things and complain, saying I should use "endian.h". 
However on SuSE and Debian, 'endian.h' doesn't contain any function to
manipulate byte order.

So my plea for help:  Could someone with a Redhat installation please
see if there is any way to get functions that convert between little
endian and host endian, or if there is some name I can #define to
disable the 'private kernel header' warning..

Thanks.

NeilBrown

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux