Skip to content

Commit 6030371

Browse files
committed
Initial compilation fixes
1 parent 3661c54 commit 6030371

File tree

4 files changed

+30
-6
lines changed

4 files changed

+30
-6
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ OBJ_FILES := \
2828
ssl/tls1_clnt.o \
2929
ssl/tls1_svr.o \
3030
ssl/x509.o \
31-
crypto/crypto_misc.o \
31+
# crypto/crypto_misc.o \
3232
3333

3434
CPPFLAGS += -I$(XTENSA_LIBS)/include \
35-
-I$(SDK_BASE)/include \
3635
-Icrypto \
37-
-Issl
36+
-Issl \
37+
-I.
3838

3939
LDFLAGS += -L$(XTENSA_LIBS)/lib \
4040
-L$(XTENSA_LIBS)/arch/lib \
41-
-L$(SDK_BASE)/lib
41+
4242

4343
CFLAGS+=-std=c99 -DESP8266
4444

ssl/os_port.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,17 @@ extern "C" {
6262

6363
#if defined(ESP8266)
6464

65-
66-
65+
#include "util/time.h"
66+
#define alloca(size) __builtin_alloca(size)
67+
#define TTY_FLUSH()
68+
#ifdef putc
69+
#undef putc
70+
#endif
71+
#define putc(x, f) ets_putc(x)
72+
#ifdef printf
73+
#undef printf
74+
#endif
75+
#define printf(...) ets_printf(__VA_ARGS__)
6776

6877
#elif defined(WIN32)
6978

ssl/tls1.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,7 @@ static void *crypt_new(SSL *ssl, uint8_t *key, uint8_t *iv, int is_decrypt)
943943
return NULL; /* its all gone wrong */
944944
}
945945

946+
#ifndef ESP8266
946947
/**
947948
* Send a packet over the socket.
948949
*/
@@ -1004,6 +1005,7 @@ static int send_raw_packet(SSL *ssl, uint8_t protocol)
10041005

10051006
return ret;
10061007
}
1008+
#endif
10071009

10081010
/**
10091011
* Send an encrypted packet with padding bytes if necessary.
@@ -1190,6 +1192,7 @@ static int set_key_block(SSL *ssl, int is_write)
11901192
return 0;
11911193
}
11921194

1195+
#ifndef ESP8266
11931196
/**
11941197
* Read the SSL connection.
11951198
*/
@@ -1385,6 +1388,7 @@ int basic_read(SSL *ssl, uint8_t **in_data)
13851388

13861389
return ret;
13871390
}
1391+
#endif
13881392

13891393
/**
13901394
* Do some basic checking of data and then perform the appropriate handshaking.

util/time.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#ifndef TIME_H
2+
#define TIME_H
3+
4+
struct timeval
5+
{
6+
time_t tv_sec;
7+
long tv_usec;
8+
};
9+
10+
11+
#endif //TIME_H

0 commit comments

Comments
 (0)