diff mbox series

resolv: Make _res_opcodes a compat symbol [BZ #31764]

Message ID 20240520204910.207668-1-hjl.tools@gmail.com
State New
Headers show
Series resolv: Make _res_opcodes a compat symbol [BZ #31764] | expand

Commit Message

H.J. Lu May 20, 2024, 8:49 p.m. UTC
_res_opcodes was exported by accident as a variable.  Fix BZ #31764 by
making _res_opcodes a compat symbol.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
---
 resolv/res_debug.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Sunil Pandey May 21, 2024, 1:41 a.m. UTC | #1
On Mon, May 20, 2024 at 1:49 PM H.J. Lu <hjl.tools@gmail.com> wrote:

> _res_opcodes was exported by accident as a variable.  Fix BZ #31764 by
> making _res_opcodes a compat symbol.
>
> Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
> ---
>  resolv/res_debug.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/resolv/res_debug.c b/resolv/res_debug.c
> index dab5283bbf..1b1f5233f9 100644
> --- a/resolv/res_debug.c
> +++ b/resolv/res_debug.c
> @@ -141,6 +141,7 @@ static const char res_opcodes[][9] =
>    };
>  #if SHLIB_COMPAT (libresolv, GLIBC_2_0, GLIBC_2_26)
>  strong_alias (res_opcodes, _res_opcodes)
> +compat_symbol (libresolv, _res_opcodes, _res_opcodes, GLIBC_2_0);
>  #endif
>
>  static const char *p_section(int section, int opcode);
> --
> 2.45.1
>
>
LGTM
Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>

--Sunil
diff mbox series

Patch

diff --git a/resolv/res_debug.c b/resolv/res_debug.c
index dab5283bbf..1b1f5233f9 100644
--- a/resolv/res_debug.c
+++ b/resolv/res_debug.c
@@ -141,6 +141,7 @@  static const char res_opcodes[][9] =
   };
 #if SHLIB_COMPAT (libresolv, GLIBC_2_0, GLIBC_2_26)
 strong_alias (res_opcodes, _res_opcodes)
+compat_symbol (libresolv, _res_opcodes, _res_opcodes, GLIBC_2_0);
 #endif
 
 static const char *p_section(int section, int opcode);