Skip to contentSkip to conversation

udev-076 and klibc

DISCUSSION Jürg Billeter 2 participants 2 messages Nov 30, 2005

lore
Share & tools
lore
#0 lore raw

Hi

Requiring glibc's byteswap seems to break the build of volume_id with klibc 1.1.1 (klibc doesn't provide byteswap.h)

http://kernel.org/git/?p=linux/hotplug/udev.git;a=commit;hˆbe7e8887e9284666b7844bb0faa84fbb699fb2

Regards,

Jürg

Signature · 13 lines
Jürg Billeter <[email protected]>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&opÌk
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
#1 lore raw
Quoted 2 lines · Jürg Billeter

Requiring glibc's byteswap seems to break the build of volume_id with klibc 1.1.1 (klibc doesn't provide byteswap.h)

Yes, I know. You need to add the attached file to the klibc tree.

Kay

/*
* elf.h
*/

#ifndef _BYTESWAP_H
#define _BYTESWAP_H

#define bswap_16(x) \
	((__u16)( \
		(((__u16)(x) & (__u16)0x00ffU) << 8) | \
		(((__u16)(x) & (__u16)0xff00U) >> 8) ))
#define bswap_32(x) \
	((__u32)( \
		(((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
		(((__u32)(x) & (__u32)0x0000ff00UL) <<  8) | \
		(((__u32)(x) & (__u32)0x00ff0000UL) >>  8) | \
		(((__u32)(x) & (__u32)0xff000000UL) >> 24) ))
#define bswap_64(x) \
	((__u64)( \
		(__u64)(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \
		(__u64)(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \
		(__u64)(((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \
		(__u64)(((__u64)(x) & (__u64)0x00000000ff000000ULL) <<  8) | \
	        (__u64)(((__u64)(x) & (__u64)0x000000ff00000000ULL) >>  8) | \
		(__u64)(((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | \
		(__u64)(((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \
		(__u64)(((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56) ))

#endif /* _BYTESWAP_H */