Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix includes for musl libc #9814

Merged
merged 1 commit into from Jun 24, 2021
Merged

Fix includes for musl libc #9814

merged 1 commit into from Jun 24, 2021

Conversation

thyrc
Copy link
Contributor

@thyrc thyrc commented Jun 14, 2021

MemoryWatcher.cpp is missing the cstring include for strncpy.

On some platforms the missing header is included implicitly, but on musl we'll have to include cstring to build dolphin successfully.

./Source/Core/Core/MemoryWatcher.cpp: In member function 'bool MemoryWatcher::OpenSocket(const string&)':
./Source/Core/Core/MemoryWatcher.cpp:63:3: error: 'strncpy' was not declared in this scope
   63 |   strncpy(m_addr.sun_path, path.c_str(), sizeof(m_addr.sun_path) - 1);
      |   ^~~~~~~
./Source/Core/Core/MemoryWatcher.cpp:14:1: note: 'strncpy' is defined in header '<cstring>'; did you forget to '#include <cstring '?
   13 | #include "Core/PowerPC/MMU.h"
  +++ |+#include <cstring>
   14 |

@JosJuice
Copy link
Member

LGTM if you amend the commit with a lint fix.

@JosJuice
Copy link
Member

The code looks good now, but we prefer that little changes like lint fixes are amended to the original commit instead of being added in a second commit.

@leoetlino leoetlino merged commit 965a8bd into dolphin-emu:master Jun 24, 2021
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants