All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libmultipath: fix compilation with -fno-common
@ 2020-01-16 21:55 mwilck
  2020-01-21 15:58 ` Benjamin Marzinski
  0 siblings, 1 reply; 2+ messages in thread
From: mwilck @ 2020-01-16 21:55 UTC (permalink / raw)
  To: Christophe Varoqui, Benjamin Marzinski; +Cc: dm-devel, Martin Wilck

From: Martin Wilck <mwilck@suse.com>

This never-used variable must be declared extern in order to avoid
a link stage error with -fno-common.
---
 libmultipath/structs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmultipath/structs.h b/libmultipath/structs.h
index a3adf906..4bb567d3 100644
--- a/libmultipath/structs.h
+++ b/libmultipath/structs.h
@@ -106,7 +106,7 @@ enum yes_no_undef_states {
  * _FIND_MULTIPATHS_F must have the same value as YNU_YES.
  * Generate a compile time error if that isn't the case.
  */
-char ___error1___[-(_FIND_MULTIPATHS_F != YNU_YES)];
+extern char ___error1___[-(_FIND_MULTIPATHS_F != YNU_YES)];
 
 #define find_multipaths_on(conf) \
 	(!!((conf)->find_multipaths & _FIND_MULTIPATHS_F))
-- 
2.24.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] libmultipath: fix compilation with -fno-common
  2020-01-16 21:55 [PATCH] libmultipath: fix compilation with -fno-common mwilck
@ 2020-01-21 15:58 ` Benjamin Marzinski
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Marzinski @ 2020-01-21 15:58 UTC (permalink / raw)
  To: mwilck; +Cc: dm-devel

On Thu, Jan 16, 2020 at 10:55:14PM +0100, mwilck@suse.com wrote:
> From: Martin Wilck <mwilck@suse.com>


Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
> 
> This never-used variable must be declared extern in order to avoid
> a link stage error with -fno-common.
> ---
>  libmultipath/structs.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libmultipath/structs.h b/libmultipath/structs.h
> index a3adf906..4bb567d3 100644
> --- a/libmultipath/structs.h
> +++ b/libmultipath/structs.h
> @@ -106,7 +106,7 @@ enum yes_no_undef_states {
>   * _FIND_MULTIPATHS_F must have the same value as YNU_YES.
>   * Generate a compile time error if that isn't the case.
>   */
> -char ___error1___[-(_FIND_MULTIPATHS_F != YNU_YES)];
> +extern char ___error1___[-(_FIND_MULTIPATHS_F != YNU_YES)];
>  
>  #define find_multipaths_on(conf) \
>  	(!!((conf)->find_multipaths & _FIND_MULTIPATHS_F))
> -- 
> 2.24.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-21 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-16 21:55 [PATCH] libmultipath: fix compilation with -fno-common mwilck
2020-01-21 15:58 ` Benjamin Marzinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.