mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
unix: add shutdown()
As sys/socket.h defines shutdown also, we can't include common.h in unix mocks.
This commit is contained in:
parent
237740de9c
commit
cf14717d43
@ -13,10 +13,13 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../../unix/common.h"
|
||||
#include "../../trezorhal/usb.h"
|
||||
#include "../../trezorhal/touch.h"
|
||||
|
||||
void __attribute__((noreturn)) __fatal_error(const char *expr, const char *msg, const char *file, int line, const char *func);
|
||||
|
||||
#define ensure(expr, msg) (((expr) == sectrue) ? (void)0 : __fatal_error(#expr, msg, __FILE__, __LINE__, __func__))
|
||||
|
||||
#define TREZOR_UDP_IFACE 0
|
||||
#define TREZOR_UDP_PORT 21324
|
||||
|
||||
|
@ -31,3 +31,8 @@ void hal_delay(uint32_t ms)
|
||||
{
|
||||
usleep(1000 * ms);
|
||||
}
|
||||
|
||||
void shutdown(void)
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
|
@ -9,4 +9,6 @@ void __attribute__((noreturn)) __fatal_error(const char *expr, const char *msg,
|
||||
|
||||
void hal_delay(uint32_t ms);
|
||||
|
||||
void shutdown(void);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user