File: 0009-buffer-fix-multiple-space-definitions.patch

package info (click to toggle)
libowfat 0.34-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 5,296 kB
  • sloc: ansic: 20,181; makefile: 15
file content (41 lines) | stat: -rw-r--r-- 1,429 bytes parent folder | download | duplicates (2)
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
From: Agathe Porte <gagath@debian.org>
Date: Fri, 3 Oct 2025 15:57:44 +0200
Subject: buffer: fix multiple space definitions

buffer_0_space and buffer_1_space are defined multiple times, leading to
a linker error. Use alternative names to fix the issue.

Signed-off-by: Agathe Porte <gagath@debian.org>
---
 buffer/buffer_0small.c | 4 ++--
 buffer/buffer_1small.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/buffer/buffer_0small.c b/buffer/buffer_0small.c
index c0cfbf3..4dd1527 100644
--- a/buffer/buffer_0small.c
+++ b/buffer/buffer_0small.c
@@ -6,7 +6,7 @@ static ssize_t b0read(int fd,char* buf, size_t len) {
   return read(fd,buf,len);
 }
 
-static char buffer_0_space[128];
-static buffer it = BUFFER_INIT_READ(b0read,0,buffer_0_space,sizeof buffer_0_space);
+static char buffer_0small_space[128];
+static buffer it = BUFFER_INIT_READ(b0read,0,buffer_0small_space,sizeof buffer_0small_space);
 buffer *buffer_0small = &it;
 
diff --git a/buffer/buffer_1small.c b/buffer/buffer_1small.c
index 5e88ea5..1efa8ce 100644
--- a/buffer/buffer_1small.c
+++ b/buffer/buffer_1small.c
@@ -1,7 +1,7 @@
 #include <unistd.h>
 #include "buffer.h"
 
-char buffer_1_space[128];
-static buffer it = BUFFER_INIT(write,1,buffer_1_space,sizeof buffer_1_space);
+char buffer_1small_space[128];
+static buffer it = BUFFER_INIT(write,1,buffer_1small_space,sizeof buffer_1small_space);
 buffer *buffer_1small = &it;