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

Incorporate FreeBSD port patches #16221

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions gfx/common/wayland_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,13 @@ bool gfx_ctx_wl_get_metrics_common(void *data,
static int create_shm_file(off_t size)
{
int fd, ret;
#ifndef __FreeBSD__
if ((fd = syscall(SYS_memfd_create, SPLASH_SHM_NAME,
MFD_CLOEXEC | MFD_ALLOW_SEALING)) >= 0)
#else
if ((fd = memfd_create(SPLASH_SHM_NAME,
MFD_CLOEXEC | MFD_ALLOW_SEALING)) >= 0)
#endif
{
fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK);

Expand Down
4 changes: 2 additions & 2 deletions input/input_keymaps.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#include "SDL.h"
#endif

#if defined(__linux__) || defined(HAVE_WAYLAND)
#if defined(__linux__) || defined(HAVE_WAYLAND) || defined(__FreeBSD__) && !defined(__PS4__)
#if defined(__linux__)
#include <linux/input.h>
#include <linux/kd.h>
Expand Down Expand Up @@ -1130,7 +1130,7 @@ const struct rarch_key_map rarch_key_map_x11[] = {
};
#endif

#if defined(__linux__) || defined(HAVE_WAYLAND)
#if defined(__linux__) || defined(HAVE_WAYLAND) || defined(__FreeBSD__) && !defined(__PS4__)
/* Note: Only one input can be mapped to each
* RETROK_* key. If several physical inputs
* correspond to the same key, these inputs
Expand Down
4 changes: 2 additions & 2 deletions libretro-common/features/features_cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

#if defined(_XBOX360)
#include <PPCIntrinsics.h>
#elif !defined(__MACH__) && (defined(__POWERPC__) || defined(__powerpc__) || defined(__ppc__) || defined(__PPC64__) || defined(__powerpc64__))
#elif !defined(__MACH__) && !defined(__FreeBSD__) && (defined(__POWERPC__) || defined(__powerpc__) || defined(__ppc__) || defined(__PPC64__) || defined(__powerpc64__))
#ifndef _PPU_INTRINSICS_H
#include <ppu_intrinsics.h>
#endif
Expand Down Expand Up @@ -181,7 +181,7 @@ retro_perf_tick_t cpu_features_get_perf_counter(void)
time_ticks = (1000000 * tv_sec + tv_usec);
#elif defined(GEKKO)
time_ticks = gettime();
#elif !defined(__MACH__) && (defined(_XBOX360) || defined(__powerpc__) || defined(__ppc__) || defined(__POWERPC__) || defined(__PSL1GHT__) || defined(__PPC64__) || defined(__powerpc64__))
#elif !defined(__MACH__) && !defined(__FreeBSD__) && (defined(_XBOX360) || defined(__powerpc__) || defined(__ppc__) || defined(__POWERPC__) || defined(__PSL1GHT__) || defined(__PPC64__) || defined(__powerpc64__))
time_ticks = __mftb();
#elif (defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK > 0) || defined(__QNX__) || defined(ANDROID)
struct timespec tv;
Expand Down
Loading