Fix issues (remove lmdb.h references, fix mongoose warning)

This commit is contained in:
Tobias Reisinger 2024-04-17 00:01:25 +02:00
parent c49ada88c3
commit 5d98a0579b
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
8 changed files with 16 additions and 5 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use nix

5
.gitignore vendored
View file

@ -2,3 +2,8 @@ docs/
build/ build/
include/sql/*.h include/sql/*.h
# Added by cargo
/target

View file

@ -3,7 +3,6 @@
#include <uuid/uuid.h> #include <uuid/uuid.h>
#include <stdint.h> #include <stdint.h>
#include <lmdb.h>
#include <config.h> #include <config.h>
#include <models/relay.h> #include <models/relay.h>

View file

@ -3,7 +3,6 @@
#include <stdint.h> #include <stdint.h>
#include <time.h> #include <time.h>
#include <lmdb.h>
#include <constants.h> #include <constants.h>
#include <models/schedule.h> #include <models/schedule.h>

View file

@ -3,7 +3,6 @@
#include <stdint.h> #include <stdint.h>
#include <uuid/uuid.h> #include <uuid/uuid.h>
#include <lmdb.h>
#include <models/period.h> #include <models/period.h>

9
shell.nix Normal file
View file

@ -0,0 +1,9 @@
with import <nixpkgs> {};
mkShell {
nativeBuildInputs = [
cmake
sqlite
util-linux
wiringpi
];
}

View file

@ -2,7 +2,6 @@
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <time.h> #include <time.h>
#include <lmdb.h>
#include <signal.h> #include <signal.h>
#include <syslog.h> #include <syslog.h>

2
vendor/mongoose.c vendored
View file

@ -1108,7 +1108,7 @@ void cs_md5_update(cs_md5_ctx *ctx, const unsigned char *buf, size_t len) {
memcpy(ctx->in, buf, len); memcpy(ctx->in, buf, len);
} }
void cs_md5_final(unsigned char digest[16], cs_md5_ctx *ctx) { void cs_md5_final(unsigned char *digest, cs_md5_ctx *ctx) {
unsigned count; unsigned count;
unsigned char *p; unsigned char *p;
uint32_t *a; uint32_t *a;