gimx: fix build

(cherry picked from commit 7a875d8aa5)
This commit is contained in:
bb2020
2025-05-07 15:00:15 +03:00
committed by github-actions[bot]
parent 543fe66983
commit 3f6268ffd3
3 changed files with 36 additions and 40 deletions

View File

@@ -1,8 +1,15 @@
diff --git a/core/config_reader.c b/core/config_reader.c
index 451fc48..ed45f4d 100644
--- a/core/config_reader.c
+++ b/core/config_reader.c
@@ -1355,7 +1355,7 @@ int read_config_file(const char* file)
@@ -17,7 +17,7 @@
#include "../directories.h"
#include "macros.h"
#include <errno.h>
-
+#include <stdlib.h>
/*
* These variables are used to read the configuration.
*/
@@ -1355,7 +1355,7 @@
char file_path[PATH_MAX];
snprintf(file_path, sizeof(file_path), "%s%s%s%s", gimx_params.homedir, GIMX_DIR, CONFIG_DIR, file);
@@ -11,11 +18,18 @@ index 451fc48..ed45f4d 100644
if(read_file(file_path) == -1)
{
gerror("read_file failed\n");
diff --git a/core/gimx.c b/core/gimx.c
index 700cae9..9143d8b 100755
--- a/core/gimx.c
+++ b/core/gimx.c
@@ -192,7 +192,7 @@ void show_config()
@@ -8,7 +8,7 @@
#include <errno.h> //to print errors
#include <string.h> //to print errors
#include <limits.h> //PATH_MAX
-
+#include <stdlib.h>
#ifndef WIN32
#include <termios.h> //to disable/enable echo
#include <unistd.h>
@@ -192,7 +192,7 @@
char file_path[PATH_MAX];
snprintf(file_path, sizeof(file_path), "%s%s%s%s", gimx_params.homedir, GIMX_DIR, CONFIG_DIR, gimx_params.config_file);
@@ -24,3 +38,14 @@ index 700cae9..9143d8b 100755
FILE * fp = gfile_fopen(file_path, "r");
if (fp == NULL)
{
--- a/core/connectors/bluetooth/linux/bt_mgmt.c
+++ b/core/connectors/bluetooth/linux/bt_mgmt.c
@@ -322,7 +322,7 @@ static int read_link_keys(uint16_t index, uint16_t nb_keys, bdaddr_t bdaddrs[nb_
bdaddr_t ba;
char dongle_bdaddr[18];
- if(bt_device_abs_get(bt_abs_value)->get_bdaddr(index, &ba) < 0)
+ if(bt_device_abs_get()->get_bdaddr(index, &ba) < 0)
{
fprintf(stderr, "can't read device bdaddr\n");
return -1;

View File

@@ -1,26 +0,0 @@
diff --git a/core/config_reader.c b/core/config_reader.c
index 451fc48..737d27c 100644
--- a/core/config_reader.c
+++ b/core/config_reader.c
@@ -17,7 +17,7 @@
#include "../directories.h"
#include "macros.h"
#include <errno.h>
-
+#include <stdlib.h>
/*
* These variables are used to read the configuration.
*/
diff --git a/core/gimx.c b/core/gimx.c
index 700cae9..693f72f 100755
--- a/core/gimx.c
+++ b/core/gimx.c
@@ -8,7 +8,7 @@
#include <errno.h> //to print errors
#include <string.h> //to print errors
#include <limits.h> //PATH_MAX
-
+#include <stdlib.h>
#ifndef WIN32
#include <termios.h> //to disable/enable echo
#include <unistd.h>

View File

@@ -34,10 +34,8 @@ stdenv.mkDerivation rec {
};
env.NIX_CFLAGS_COMPILE = "-Wno-error";
patches = [
./conf.patch
./gcc14.patch
];
patches = [ ./conf.patch ];
makeFlags = [ "build-core" ];
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
@@ -50,7 +48,6 @@ stdenv.mkDerivation rec {
xorg.libX11
xorg.libXi
];
makeFlags = [ "build-core" ];
installPhase = ''
runHook preInstall
@@ -70,10 +67,10 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
meta = with lib; {
meta = {
homepage = "https://github.com/matlo/GIMX";
description = "Game Input Multiplexer";
license = licenses.gpl3Only;
platforms = platforms.linux;
license = lib.licenses.gpl3Only;
platforms = lib.platforms.linux;
};
}