]> git.pld-linux.org Git - packages/busybox.git/blame - busybox-kernel_headers.patch
- compilation with userspace kernel headers fixed
[packages/busybox.git] / busybox-kernel_headers.patch
CommitLineData
4669ee58
JK
1diff -durN -x '*~' -x '*.o' -x '.*' -x '*.[0-9]' -x '*.links' -x '*.html' -x '*.txt' -x '*.pod' -x 'config*' busybox-1.00-pre4.orig/libbb/loop.h busybox-1.00-pre4/libbb/loop.h
2--- busybox-1.00-pre4.orig/libbb/loop.h 1970-01-01 01:00:00.000000000 +0100
3+++ busybox-1.00-pre4/libbb/loop.h 2004-12-21 17:45:14.000000000 +0100
4@@ -0,0 +1,5 @@
5+#include <linux/posix_types.h>
6+#undef dev_t
7+#define dev_t __kernel_dev_t
8+#include <linux/loop.h>
9+#undef dev_t
10diff -durN -x '*~' -x '*.o' -x '.*' -x '*.[0-9]' -x '*.links' -x '*.html' -x '*.txt' -x '*.pod' -x 'config*' busybox-1.00-pre4.orig/miscutils/hdparm.c busybox-1.00-pre4/miscutils/hdparm.c
11--- busybox-1.00-pre4.orig/miscutils/hdparm.c 2004-12-21 17:58:28.111674208 +0100
12+++ busybox-1.00-pre4/miscutils/hdparm.c 2004-12-21 17:53:25.000000000 +0100
13@@ -45,7 +45,7 @@
14 #include <linux/types.h>
15 #include <linux/hdreg.h>
16 #include <linux/major.h>
17-#include <asm/byteorder.h>
18+#include <endian.h>
19
20
21 #if (__BYTE_ORDER == __BIG_ENDIAN) && !defined(__USE_XOPEN)
22@@ -2425,7 +2425,8 @@
23 }
24 }
25 for(i=0; i<(sizeof args)/2; i+=2)
26- __le16_to_cpus((uint16_t *)(&args[i]));
27+ if (__BYTE_ORDER != __LITTLE_ENDIAN)
28+ args[i]=bswap_16(args[i]);
29
30 identify((void *)&args[4], NULL);
31 identify_abort:
32@@ -2491,7 +2492,8 @@
33 for (i = 0; count >= 4; ++i)
34 {
35 sbuf[i] = (fromhex(b[0]) << 12) | (fromhex(b[1]) << 8) | (fromhex(b[2]) << 4) | fromhex(b[3]);
36- __le16_to_cpus((uint16_t *)(&sbuf[i]));
37+ if (__BYTE_ORDER != __LITTLE_ENDIAN)
38+ sbuf[i]=bswap_16(sbuf[i]);
39 b += 5;
40 count -= 5;
41 }
This page took 0.063224 seconds and 4 git commands to generate.