bindfs/0001-build-fix-build-failure-with-fno-common.patch

32 lines
1.1 KiB
Diff
Raw Normal View History

From 9ad6363e9c1ee463bff7f28454283dd49d0d2e20 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Wed, 8 Jan 2020 11:17:41 +0100
Subject: [PATCH] build: fix build failure with -fno-common
URL: https://github.com/mpartel/bindfs/pull/81
$ ./configure CFLAGS=-fno-common && make
ld: rate_limiter.o:(.rodata+0x0): multiple definition of
"rate_limiter_idle_credit"; bindfs.o:(.rodata+0x0): first defined here
References: https://bugzilla.opensuse.org/1160244
---
src/rate_limiter.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rate_limiter.h b/src/rate_limiter.h
index a332294..95c0069 100644
--- a/src/rate_limiter.h
+++ b/src/rate_limiter.h
@@ -26,7 +26,7 @@
/* When we are idle, we allow some time to be "credited" to the next writer.
* Otherwise, the short pause between requests would "go to waste", lowering
* the throughput when there is only one requester. */
-const double rate_limiter_idle_credit;
+extern const double rate_limiter_idle_credit;
typedef struct RateLimiter {
double rate; /* bytes / second */
--
2.24.1