1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-22 21:23:07 +03:00

Initial compilation fixes

This commit is contained in:
Ivan Grokhotkov 2015-08-31 09:05:04 +03:00
parent 3661c54000
commit 6030371051
4 changed files with 30 additions and 6 deletions

View File

@ -28,17 +28,17 @@ OBJ_FILES := \
ssl/tls1_clnt.o \
ssl/tls1_svr.o \
ssl/x509.o \
crypto/crypto_misc.o \
# crypto/crypto_misc.o \
CPPFLAGS += -I$(XTENSA_LIBS)/include \
-I$(SDK_BASE)/include \
-Icrypto \
-Issl
-Issl \
-I.
LDFLAGS += -L$(XTENSA_LIBS)/lib \
-L$(XTENSA_LIBS)/arch/lib \
-L$(SDK_BASE)/lib
CFLAGS+=-std=c99 -DESP8266

View File

@ -62,8 +62,17 @@ extern "C" {
#if defined(ESP8266)
#include "util/time.h"
#define alloca(size) __builtin_alloca(size)
#define TTY_FLUSH()
#ifdef putc
#undef putc
#endif
#define putc(x, f) ets_putc(x)
#ifdef printf
#undef printf
#endif
#define printf(...) ets_printf(__VA_ARGS__)
#elif defined(WIN32)

View File

@ -943,6 +943,7 @@ static void *crypt_new(SSL *ssl, uint8_t *key, uint8_t *iv, int is_decrypt)
return NULL; /* its all gone wrong */
}
#ifndef ESP8266
/**
* Send a packet over the socket.
*/
@ -1004,6 +1005,7 @@ static int send_raw_packet(SSL *ssl, uint8_t protocol)
return ret;
}
#endif
/**
* Send an encrypted packet with padding bytes if necessary.
@ -1190,6 +1192,7 @@ static int set_key_block(SSL *ssl, int is_write)
return 0;
}
#ifndef ESP8266
/**
* Read the SSL connection.
*/
@ -1385,6 +1388,7 @@ error:
return ret;
}
#endif
/**
* Do some basic checking of data and then perform the appropriate handshaking.

11
util/time.h Normal file
View File

@ -0,0 +1,11 @@
#ifndef TIME_H
#define TIME_H
struct timeval
{
time_t tv_sec;
long tv_usec;
};
#endif //TIME_H