summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Avison <[email protected]>2022-09-01 14:28:00 +0100
committerBen Avison <[email protected]>2022-09-12 18:46:01 +0100
commitd28ff1175d185c399add10be7824310b2b8dcd47 (patch)
tree1cd77d1e23cf5b0bac61ab4259e62841aae71290
parentb624664f52df9454755a8a67518b2a11b06cfb8b (diff)
IAR declares strncasecmp in string.h not strings.h
strings.h is not an ISO header file, so IAR generates fatal error Pe1696 'cannot open source file "strings.h"'. Even though strncasecmp isn't an ISO C library function, IAR's runtime library defines it, though it declares it in string.h instead.
-rw-r--r--examples/device/usbtmc/src/usbtmc_app.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/device/usbtmc/src/usbtmc_app.c b/examples/device/usbtmc/src/usbtmc_app.c
index 8f87a6dca..115163c7f 100644
--- a/examples/device/usbtmc/src/usbtmc_app.c
+++ b/examples/device/usbtmc/src/usbtmc_app.c
@@ -23,7 +23,11 @@
*
*/
+#ifdef __ICCARM__
+#include <string.h>
+#else
#include <strings.h>
+#endif
#include <stdlib.h> /* atoi */
#include "tusb.h"
#include "bsp/board.h"