3 # Patch managed by http://www.holgerschurig.de/patcher.html
6 --- hdparm-5.8/hdparm.c~bswap
7 +++ hdparm-5.8/hdparm.c
9 #include <linux/types.h>
10 #include <linux/hdreg.h>
11 #include <linux/major.h>
12 -#include <asm/byteorder.h>
13 +#include <byteswap.h>
15 +#define le16_to_cpus(x) bswap_16(htons(x))
22 for(i = 0; i < 0x100; ++i) {
23 - __le16_to_cpus(&id[i]);
24 + le16_to_cpus(&id[i]);
26 identify((void *)id, NULL);
30 for (i = 0; count >= 4; ++i) {
31 sbuf[i] = (fromhex(b[0]) << 12) | (fromhex(b[1]) << 8) | (fromhex(b[2]) << 4) | fromhex(b[3]);
32 - __le16_to_cpus((__u16 *)(&sbuf[i]));
33 + le16_to_cpus((__u16 *)(&sbuf[i]));