Add missing psybnc patch for proper endianess detection
[openwrt/svn-archive/archive.git] / net / psybnc / patches / 005-fix_endianess_detection.patch
1 --- a/tools/autoconf.c
2 +++ b/tools/autoconf.c
3 @@ -222,6 +222,9 @@
4
5 int checkendian()
6 {
7 +#ifdef ENDIANESS
8 + return ENDIANESS;
9 +#else
10 char xyz[]="\x01\x02\x03\x04";
11 unsigned long *lp;
12 unsigned long result;
13 @@ -229,6 +232,7 @@
14 result=*lp;
15 if(result==67305985) return 0x1;
16 return 0x0;
17 +#endif
18 }
19
20 int main()
21 --- a/Makefile
22 +++ b/Makefile
23 @@ -7,7 +7,7 @@
24 @$(HOSTCC) tools/convconf.c -o tools/convconf
25 @tools/convconf
26 @echo [*] Running Autoconfig.
27 - @$(HOSTCC) -I. tools/autoconf.c -o tools/autoconf
28 + @$(HOSTCC) -I. -DENDIANESS=$(ENDIANESS) tools/autoconf.c -o tools/autoconf
29 @tools/autoconf
30 @echo [*] Compiling MakeSalt for Encryption..
31 @$(HOSTCC) -I. -o makesalt tools/makesalt.c