summaryrefslogtreecommitdiff
path: root/apps/plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugin.h')
-rw-r--r--apps/plugin.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/plugin.h b/apps/plugin.h
index 5f594e6..e6e41e1 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -32,11 +32,13 @@
#endif
#include <stdbool.h>
+#include <inttypes.h>
#include <sys/types.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "string-extra.h"
char* strncpy(char *, const char *, size_t);
void* plugin_get_buffer(size_t *buffer_size);
@@ -111,6 +113,11 @@ void* plugin_get_buffer(size_t *buffer_size);
#include "usbstack/usb_hid_usage_tables.h"
#endif
+
+/* on some platforms strcmp() seems to be a tricky define which
+ * breaks if we write down strcmp's prototype */
+#undef strcmp
+
#ifdef PLUGIN
#if defined(DEBUG) || defined(SIMULATOR)
@@ -529,7 +536,7 @@ struct plugin_api {
/* strings and memory */
int (*snprintf)(char *buf, size_t size, const char *fmt, ...)
ATTRIBUTE_PRINTF(3, 4);
- int (*vsnprintf)(char *buf, int size, const char *fmt, va_list ap);
+ int (*vsnprintf)(char *buf, size_t size, const char *fmt, va_list ap);
char* (*strcpy)(char *dst, const char *src);
size_t (*strlcpy)(char *dst, const char *src, size_t length);
size_t (*strlen)(const char *str);