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

Add missing headers #15075

Merged
merged 3 commits into from
Jan 24, 2024
Merged

Add missing headers #15075

merged 3 commits into from
Jan 24, 2024

Conversation

pastalian
Copy link
Contributor

Some systems must explicitly include these headers.

Reported by: https://bugs.gentoo.org/922263

/var/tmp/portage/games-emulation/rpcs3-9999/work/rpcs3-9999/Utilities/Thread.cpp:3135:17: error: use of undeclared identifier 'SYS_gettid'
 3135 |         return syscall(SYS_gettid);
/var/tmp/portage/games-emulation/rpcs3-9999/work/rpcs3-9999/Utilities/JITASM.cpp:23:52: error: use of undeclared identifier 'getpid'; did you mean 'getpt'?
   23 |                 std::string name{fmt::format("/tmp/perf-%d.map", getpid())};
      |                                                                  ^~~~~~
      |                                                                  getpt
/var/tmp/portage/games-emulation/rpcs3-9999/work/rpcs3-9999/3rdparty/GL/../pine/pine_server.h:433:24: error: use of undeclared identifier 'read'; did you mean '_IO_cookie_io_functions_t::read'?
  433 |                                         auto tmp_length = read_portable(m_msgsock, &m_ipc_buffer[receive_length], MAX_IPC_SIZE - receive_length);

@@ -27,7 +27,7 @@
#include <sys/un.h>
#include <arpa/inet.h>
#include <poll.h>
#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
Copy link
Member

@MSuih MSuih Jan 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just do #ifndef MSVC or #ifndef _WIN32 at this point

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, it's right above this. Why was this even separated lol.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's a platform check, _WIN32 would be the right define to check for.

@pastalian pastalian force-pushed the missing-headers branch 2 times, most recently from 4176a8b to e4b15c0 Compare January 21, 2024 09:01
Some systems must explicitly include these headers.
Tatsh added a commit to Tatsh/tatsh-overlay that referenced this pull request Jan 24, 2024
RPCS3/rpcs3#15075
Related: #259

Signed-off-by: Andrew Udvare <audvare@gmail.com>
@Megamouse Megamouse merged commit e8ad6ec into RPCS3:master Jan 24, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants