matrixssl: Fix compile on uClibc-0.9.31
[openwrt/svn-archive/archive.git] / libs / matrixssl / patches / 200-compile-fixes.patch
1 Index: matrixssl/src/os/linux/linux.c
2 ===================================================================
3 --- matrixssl.orig/src/os/linux/linux.c 2010-11-02 21:01:53.702000002 +0100
4 +++ matrixssl/src/os/linux/linux.c 2010-11-02 21:02:37.657009753 +0100
5 @@ -39,8 +39,12 @@
6
7 #include "../osLayer.h"
8
9 +#ifndef CLK_TCK
10 +# define CLK_TCK CLOCKS_PER_SEC
11 +#endif
12 +
13 #if defined(__i386__) || defined(RDTSC)
14 -#include <asm/timex.h>
15 +//#include <asm/timex.h>
16 /*
17 As defined in asm/timex.h for x386:
18 */
19 @@ -51,7 +55,7 @@
20 static sslTime_t hiresStart; /* zero-time */
21 static sslTime_t hiresFreq; /* tics per second */
22 #else /* __i386__ */
23 -static unsigned int32 prevTicks; /* Check wrap */
24 +static uint32 prevTicks; /* Check wrap */
25 static sslTime_t elapsedTime; /* Last elapsed time */
26 #endif
27
28 Index: matrixssl/src/Makefile
29 ===================================================================
30 --- matrixssl.orig/src/Makefile 2010-11-02 21:02:42.312000001 +0100
31 +++ matrixssl/src/Makefile 2010-11-02 21:04:21.979001189 +0100
32 @@ -63,13 +63,6 @@
33 endif
34
35 #
36 -# Override variables for compilation on x86-64 (AMD64, Nacona, etc)
37 -#
38 -ifeq ($(shell uname -m),x86_64)
39 -DFLAGS += -march=k8 -fPIC -DFP_64BIT -DTFM_X86_64 -DRDTSC
40 -endif
41 -
42 -#
43 # Compile options
44 #
45 SHARED = -shared
46 @@ -77,18 +70,6 @@
47 LDFLAGS = -lc -lpthread -Wl,-soname,$(SONAME)
48
49 #
50 -# Override variables for compilation on Mac OS X (Darwin)
51 -#
52 -ifeq ($(shell uname),Darwin)
53 -CC = cc
54 -SO = .dylib
55 -SHARED = -dynamiclib
56 -CFLAGS += -DOSX -isystem -I/usr/include
57 -LDFLAGS = -flat_namespace -install_name @executable_path/../src/$(LIBRARY)
58 -STRIP = test
59 -endif
60 -
61 -#
62 # Override variables for compilation on uClinux (example only)
63 #
64 ifdef UCLINUX