fdt: Use bswapN instead of bswap_N
Fixes the libfdt enabled build for hosts that have <machine/bswap.h>. The code at the beginning of qemu/bswap.h is attempting to standardize on bswapN. In the case of CONFIG_MACHINE_BSWAP_H, this is all we get. In the case of CONFIG_BYTESWAP_H, we get bswap_N from the system header and then wrap these with inline functions to get bswapN. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
		
							parent
							
								
									fedf2de310
								
							
						
					
					
						commit
						fedb88bd32
					
				@ -22,15 +22,15 @@
 | 
				
			|||||||
#include "qemu/bswap.h"
 | 
					#include "qemu/bswap.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef HOST_WORDS_BIGENDIAN
 | 
					#ifdef HOST_WORDS_BIGENDIAN
 | 
				
			||||||
#define fdt32_to_cpu(x)		(x)
 | 
					#define fdt32_to_cpu(x)  (x)
 | 
				
			||||||
#define cpu_to_fdt32(x)		(x)
 | 
					#define cpu_to_fdt32(x)  (x)
 | 
				
			||||||
#define fdt64_to_cpu(x)		(x)
 | 
					#define fdt64_to_cpu(x)  (x)
 | 
				
			||||||
#define cpu_to_fdt64(x)		(x)
 | 
					#define cpu_to_fdt64(x)  (x)
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
#define fdt32_to_cpu(x)		(bswap_32((x)))
 | 
					#define fdt32_to_cpu(x)  bswap32(x)
 | 
				
			||||||
#define cpu_to_fdt32(x)		(bswap_32((x)))
 | 
					#define cpu_to_fdt32(x)  bswap32(x)
 | 
				
			||||||
#define fdt64_to_cpu(x)		(bswap_64((x)))
 | 
					#define fdt64_to_cpu(x)  bswap64(x)
 | 
				
			||||||
#define cpu_to_fdt64(x)		(bswap_64((x)))
 | 
					#define cpu_to_fdt64(x)  bswap64(x)
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif /* _LIBFDT_ENV_H */
 | 
					#endif /* _LIBFDT_ENV_H */
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user