diff mbox series

input: Fix compiling against libedit with -fno-common

Message ID 20200502183706.2719782-1-floppym@gentoo.org (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series input: Fix compiling against libedit with -fno-common | expand

Commit Message

Mike Gilbert May 2, 2020, 6:37 p.m. UTC
From: Jeroen Roovers <jer@gentoo.org>

With -fno-common, which will be enabled by default in GCC 10, we see
this error:

ld: input.o:(.bss+0x0): multiple definition of `el';
histedit.o:(.bss+0x8): first defined here

To fix this, simply remove the definition as it is not needed.

Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
---
 src/input.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Herbert Xu May 15, 2020, 6:30 a.m. UTC | #1
Mike Gilbert <floppym@gentoo.org> wrote:
> From: Jeroen Roovers <jer@gentoo.org>
> 
> With -fno-common, which will be enabled by default in GCC 10, we see
> this error:
> 
> ld: input.o:(.bss+0x0): multiple definition of `el';
> histedit.o:(.bss+0x8): first defined here
> 
> To fix this, simply remove the definition as it is not needed.
> 
> Signed-off-by: Jeroen Roovers <jer@gentoo.org>
> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
> ---
> src/input.c | 4 ----
> 1 file changed, 4 deletions(-)

Patch applied.  Thanks.
diff mbox series

Patch

diff --git a/src/input.c b/src/input.c
index ae0c4c8..e84eca8 100644
--- a/src/input.c
+++ b/src/input.c
@@ -67,10 +67,6 @@  MKINIT char basebuf[IBUFSIZ];	/* buffer for top level input file */
 struct parsefile *parsefile = &basepf;	/* current input file */
 int whichprompt;		/* 1 == PS1, 2 == PS2 */
 
-#ifndef SMALL
-EditLine *el;			/* cookie for editline package */
-#endif
-
 STATIC void pushfile(void);
 static int preadfd(void);
 static void setinputfd(int fd, int push);