Skip to content

Add missing include#499

Merged
thp merged 1 commit intothp:masterfrom
davide125:cstring
Jul 2, 2025
Merged

Add missing include#499
thp merged 1 commit intothp:masterfrom
davide125:cstring

Conversation

@davide125
Copy link
Contributor

This fixes the following build issue with GCC 15

/builddir/build/BUILD/psmoveapi-4.0.12_20240424git26e1446-build/psmoveapi-26e1446fc9b5996192a1f406d289e64e4e97a195/examples/c/test_navcon.cpp:48:13: error: ‘strcmp’ was not declared in this scope
   48 |         if (strcmp(name, "Sony Navigation Controller") == 0) {
      |             ^~~~~~
/builddir/build/BUILD/psmoveapi-4.0.12_20240424git26e1446-build/psmoveapi-26e1446fc9b5996192a1f406d289e64e4e97a195/examples/c/test_navcon.cpp:40:1: note: ‘strcmp’ is defined in header ‘<cstring>’; this is probably fixable by adding ‘#include <cstring>’
   39 | #include "psmove.h"
  +++ |+#include <cstring>
   40 |

This fixes the following build issue with GCC 15

```
/builddir/build/BUILD/psmoveapi-4.0.12_20240424git26e1446-build/psmoveapi-26e1446fc9b5996192a1f406d289e64e4e97a195/examples/c/test_navcon.cpp:48:13: error: ‘strcmp’ was not declared in this scope
   48 |         if (strcmp(name, "Sony Navigation Controller") == 0) {
      |             ^~~~~~
/builddir/build/BUILD/psmoveapi-4.0.12_20240424git26e1446-build/psmoveapi-26e1446fc9b5996192a1f406d289e64e4e97a195/examples/c/test_navcon.cpp:40:1: note: ‘strcmp’ is defined in header ‘<cstring>’; this is probably fixable by adding ‘#include <cstring>’
   39 | #include "psmove.h"
  +++ |+#include <cstring>
   40 |
```
@thp thp merged commit be2e576 into thp:master Jul 2, 2025
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants