Add riscv target, enhance arm target

This commit is contained in:
Sergey Lyubka committed 2021-07-26 11:00:37 +01:00
1 parent 53ee984eb7
commit 2d585474c1
8 files changed
+88 -30

No files matched your search

+2 -2
View File
@@ -30,9 +30,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
mg_sntp_parse(NULL, 0, &tv);
char buf[size * 4 / 3 + 5]; // At least 4 chars and nul termination
mg_base64_decode((char *) data, size, buf);
mg_base64_decode((char *) data, (int) size, buf);
mg_base64_decode(NULL, 0, buf);
mg_base64_encode(data, size, buf);
mg_base64_encode(data, (int) size, buf);
mg_base64_encode(NULL, 0, buf);
char *hexdump = mg_hexdump(data, size);
+40
View File
@@ -0,0 +1,40 @@
#include "mongoose.h"
int usleep(useconds_t us) {
for (useconds_t i = 0; i < us * 99; i++) asm("nop");
return 0;
}
int clock_gettime(clockid_t clock_id, struct timespec *tp) {
(void) clock_id;
memset(tp, 0, sizeof(*tp));
return 0;
}
struct mg_connection *mg_connect(struct mg_mgr *mgr, const char *url,
mg_event_handler_t fn, void *fn_data) {
(void) mgr, (void) url, (void) fn, (void) fn_data;
return NULL;
}
void mg_connect_resolved(struct mg_connection *c) {
(void) c;
}
struct mg_connection *mg_listen(struct mg_mgr *mgr, const char *url,
mg_event_handler_t fn, void *fn_data) {
(void) mgr, (void) url, (void) fn, (void) fn_data;
return NULL;
}
void mg_mgr_poll(struct mg_mgr *mgr, int ms) {
(void) mgr, (void) ms;
}
bool mg_send(struct mg_connection *c, const void *buf, size_t len) {
(void) c, (void) buf, (void) len;
return 0;
}
void _fini(void) {
}
+4 -2
View File
@@ -13,11 +13,13 @@
#include <time.h>
#include <unistd.h>
int clock_gettime(clockid_t clock_id, struct timespec *tp);
#define MG_DIRSEP '/'
#define MG_INT64_FMT "%lld"
#undef MG_PATH_MAX
#define MG_PATH_MAX 100
#undef MG_ENABLE_SOCKET
#define MG_ENABLE_SOCKET 0
#define realpath(a, b) (a)
int clock_gettime(clockid_t clock_id, struct timespec *tp);