Fix C header for g_chdir, needed by deja-dup

Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
Florian Weimer 2023-04-17 22:20:58 +02:00
parent 9836708635
commit 641f89612f
2 changed files with 24 additions and 1 deletions

19
vala-g_chdir.patch Normal file
View File

@ -0,0 +1,19 @@
glib-2.0: g_chdir is declared in <glib/gstdio.h>
Not <glib.h>. Fixes an implicit function error when building deja-dup.
Submitted upstream: <https://gitlab.gnome.org/GNOME/vala/-/merge_requests/310>
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index 497d6bb6c1714cae..9cfe8bd4c25afcfd 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -3485,7 +3485,7 @@ namespace GLib {
[CCode (cname = "g_atexit")]
public static void atexit (VoidFunc func);
[Version (since = "2.8")]
- [CCode (cname = "g_chdir")]
+ [CCode (cname = "g_chdir", cheader_filename = "glib/gstdio.h")]
public static int set_current_dir (string path);
}

View File

@ -3,13 +3,14 @@
Name: vala
Version: 0.56.6
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A modern programming language for GNOME
# Most files are LGPLv2.1+, curses.vapi is 2-clause BSD
License: LGPL-2.1-or-later AND BSD-2-Clause
URL: https://wiki.gnome.org/Projects/Vala
Source0: https://download.gnome.org/sources/%{name}/0.56/%{name}-%{version}.tar.xz
Patch0: vala-g_chdir.patch
BuildRequires: bison
BuildRequires: flex
@ -190,6 +191,9 @@ export -n VALAFLAGS
%changelog
* Mon Apr 17 2023 Florian Weimer <fweimer@redhat.com> - 0.56.6-2
- Fix C header for g_chdir, needed by deja-dup
* Fri Apr 07 2023 David King <amigadave@amigadave.com> - 0.56.6-1
- Update to 0.56.6