void-packages/srcpkgs/gamin/patches/0002-Fix-compilation-of-recent-glib-removing-G_CONST_RETU.patch
Đoàn Trần Công Danh 7fc9190f0e srcpkgs/g*: convert patches to -Np1
* gcc is kept at -Np0, because of void-cross

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

59 lines
2.2 KiB
Diff

source: https://src.fedoraproject.org/cgit/rpms/gamin.git/plain/0002-Fix-compilation-of-recent-glib-removing-G_CONST_RETU.patch
From 77fe68f43ce75e920b0a94b0bc572cf3a21714f2 Mon Sep 17 00:00:00 2001
From: Maciej Piechotka <uzytkownik2@gmail.com>
Date: Tue, 13 Sep 2011 09:47:05 +0200
Subject: [PATCH 2/2] Fix compilation of recent glib removing G_CONST_RETURN
https://bugzilla.gnome.org/show_bug.cgi?id=658884
---
server/gam_node.c | 2 +-
server/gam_node.h | 2 +-
server/gam_subscription.c | 2 +-
server/gam_subscription.h | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
--- a/server/gam_node.c
+++ b/server/gam_node.c
@@ -122,7 +122,7 @@ gam_node_set_is_dir(GamNode * node, gboolean is_dir)
* it has finished with the string. If it must keep it longer, it
* should makes its own copy. The returned string must not be freed.
*/
-G_CONST_RETURN char *
+const char *
gam_node_get_path(GamNode * node)
{
g_assert(node);
--- a/server/gam_node.h
+++ b/server/gam_node.h
@@ -58,7 +58,7 @@ gboolean gam_node_is_dir (GamNode *node);
void gam_node_set_is_dir (GamNode *node,
gboolean is_dir);
-G_CONST_RETURN char *gam_node_get_path (GamNode *node);
+const char *gam_node_get_path (GamNode *node);
GList *gam_node_get_subscriptions (GamNode *node);
--- a/server/gam_subscription.c
+++ b/server/gam_subscription.c
@@ -141,7 +141,7 @@ gam_subscription_pathlen(GamSubscription * sub)
* @param sub the GamSubscription
* @returns The path being monitored. It should not be freed.
*/
-G_CONST_RETURN char *
+const char *
gam_subscription_get_path(GamSubscription * sub)
{
if (sub == NULL)
--- a/server/gam_subscription.h
+++ b/server/gam_subscription.h
@@ -21,7 +21,7 @@ int gam_subscription_pathlen (GamSubscription *sub);
int gam_subscription_get_reqno (GamSubscription *sub);
-G_CONST_RETURN char *gam_subscription_get_path (GamSubscription *sub);
+const char *gam_subscription_get_path (GamSubscription *sub);
GamListener *gam_subscription_get_listener (GamSubscription *sub);