aboutsummarylogtreecommitdiffstats
path: root/fix-mbedtls_include.patch
blob: 44ef9f91578d298bbbacbb743987e18f0125959a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
+++ a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@
 bindir = $(exec_prefix)/bin
 
 # mbed TLS libraries
-MBEDTLS_DIR = $(PWD)/mbedtls
+MBEDTLS_DIR = /usr/include/
 MBEDTLS_CONFIG = $(PWD)/configs/mbedtls.h
 MBEDTLS_CFLAGS = -DMBEDTLS_CONFIG_FILE='\"$(MBEDTLS_CONFIG)\"' $(CFLAGS)
 
@@ -39,7 +39,7 @@
 # Default target: compile all programs
 all: $(BINS)
 
-%: %.o $(LIBSOBJ) $(STATICLIBS)
+%: %.o $(LIBSOBJ)
 	$(CC) $(ALL_CFLAGS) $(LIBSOBJ) $< -o $@ $(LDFLAGS)
 
 %.o: %.c $(HEADERS)

--- a/configs/mbedtls.h
+++ b/configs/mbedtls.h
@@ -24,6 +24,6 @@
 #define MBEDTLS_HAVE_ASM
 #define MBEDTLS_PLATFORM_C

-#include "mbedtls/check_config.h"
+#include <mbedtls/check_config.h>

 #endif

--- a/amiibo.c
+++ b/amiibo.c
@@ -7,8 +7,8 @@
 
 #include "nfc3d/amiibo.h"
 #include "util.h"
-#include "mbedtls/md.h"
-#include "mbedtls/aes.h"
+#include <mbedtls/md.h>
+#include <mbedtls/aes.h>
 #include <errno.h>
 #include "portable_endian.h"
 
--- a/include/nfc3d/drbg.h
+++ b/include/nfc3d/drbg.h
@@ -10,7 +10,7 @@
 
 #include <stdbool.h>
 #include <stdint.h>
-#include "mbedtls/md.h"
+#include <mbedtls/md.h>
 
 #define NFC3D_DRBG_MAX_SEED_SIZE	480	/* Hardcoded max size in 3DS NFC module */
 #define NFC3D_DRBG_OUTPUT_SIZE		32	/* Every iteration generates 32 bytes */