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 5f594e6cf5..e6e41e1a3f 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -32,11 +32,13 @@
32#endif 32#endif
33 33
34#include <stdbool.h> 34#include <stdbool.h>
35#include <inttypes.h>
35#include <sys/types.h> 36#include <sys/types.h>
36#include <stdarg.h> 37#include <stdarg.h>
37#include <stdio.h> 38#include <stdio.h>
38#include <stdlib.h> 39#include <stdlib.h>
39#include <string.h> 40#include <string.h>
41#include "string-extra.h"
40 42
41char* strncpy(char *, const char *, size_t); 43char* strncpy(char *, const char *, size_t);
42void* plugin_get_buffer(size_t *buffer_size); 44void* plugin_get_buffer(size_t *buffer_size);
@@ -111,6 +113,11 @@ void* plugin_get_buffer(size_t *buffer_size);
111#include "usbstack/usb_hid_usage_tables.h" 113#include "usbstack/usb_hid_usage_tables.h"
112#endif 114#endif
113 115
116
117/* on some platforms strcmp() seems to be a tricky define which
118 * breaks if we write down strcmp's prototype */
119#undef strcmp
120
114#ifdef PLUGIN 121#ifdef PLUGIN
115 122
116#if defined(DEBUG) || defined(SIMULATOR) 123#if defined(DEBUG) || defined(SIMULATOR)
@@ -529,7 +536,7 @@ struct plugin_api {
529 /* strings and memory */ 536 /* strings and memory */
530 int (*snprintf)(char *buf, size_t size, const char *fmt, ...) 537 int (*snprintf)(char *buf, size_t size, const char *fmt, ...)
531 ATTRIBUTE_PRINTF(3, 4); 538 ATTRIBUTE_PRINTF(3, 4);
532 int (*vsnprintf)(char *buf, int size, const char *fmt, va_list ap); 539 int (*vsnprintf)(char *buf, size_t size, const char *fmt, va_list ap);
533 char* (*strcpy)(char *dst, const char *src); 540 char* (*strcpy)(char *dst, const char *src);
534 size_t (*strlcpy)(char *dst, const char *src, size_t length); 541 size_t (*strlcpy)(char *dst, const char *src, size_t length);
535 size_t (*strlen)(const char *str); 542 size_t (*strlen)(const char *str);