summaryrefslogtreecommitdiff
path: root/www-client/elinks/files/elinks-0.16.1.1-perl-5.38.patch
blob: 08808a8eaf514a979801d194ba947dc0a6533faf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
https://bugs.gentoo.org/909042
https://github.com/rkd77/elinks/pull/243
https://github.com/rkd77/elinks/commit/9b3cbca0fb493dc5be44649991dfdf30b746f153

[rebased for 0.16.x]

From 393bf23a2683971a72217839657bb2945a36ee54 Mon Sep 17 00:00:00 2001
From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
Date: Mon, 3 Jul 2023 14:12:22 +0300
Subject: [PATCH] Fix compilation with Perl 5.38

Perl now includes own `struct object` which clashes with elinks
implementation. Renamed `struct object` to `struct elinks_object` to
avoid it.

Bug: https://bugs.gentoo.org/909042
--- a/src/main/object.h
+++ b/src/main/object.h
@@ -11,7 +11,7 @@ extern "C" {
 #define DEBUG_REFCOUNT
 #endif
 
-struct object {
+struct elinks_object {
 	int refcount;
 #ifdef CONFIG_DEBUG
 	char *name;
@@ -20,10 +20,10 @@ struct object {
 
 #define OBJECT_HEAD(type)						\
 	LIST_HEAD(type);						\
-	struct object object
+	struct elinks_object object
 
 struct object_head {
-	OBJECT_HEAD(struct object *);
+	OBJECT_HEAD(struct elinks_object *);
 };
 
 #ifdef DEBUG_REFCOUNT
--- a/src/protocol/uri.c
+++ b/src/protocol/uri.c
@@ -1578,7 +1578,7 @@ struct uri_cache_entry {
 
 struct uri_cache {
 	struct hash *map;
-	struct object object;
+	struct elinks_object object;
 };
 
 static struct uri_cache uri_cache;
--- a/src/protocol/uri.h
+++ b/src/protocol/uri.h
@@ -89,7 +89,7 @@ struct uri {
 	unsigned int form:1;	/* URI originated from form */
 
 	/* Usage count object. */
-	struct object object;
+	struct elinks_object object;
 };
 
 enum uri_errno {