]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: include extract-store-integer.h in charset.c when PHONY_ICONV
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 24 Apr 2024 02:52:00 +0000 (02:52 +0000)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 24 Apr 2024 03:01:21 +0000 (03:01 +0000)
When building on a system where "phony iconv" is used (NetBSD in this
case, not sure why), I get:

      CXX    charset.o
    /home/smarchi/src/binutils-gdb/gdb/charset.c: In function 'size_t phony_iconv(int, const char**, size_t*, char**, size_t*)':
    /home/smarchi/src/binutils-gdb/gdb/charset.c:140:8: error: 'extract_unsigned_integer' was not declared in this scope
          = extract_unsigned_integer ((const gdb_byte *)*inbuf, 4, endian);
            ^~~~~~~~~~~~~~~~~~~~~~~~
    /home/smarchi/src/binutils-gdb/gdb/charset.c:140:8: note: suggested alternative: 'btrace_insn_number'
          = extract_unsigned_integer ((const gdb_byte *)*inbuf, 4, endian);
            ^~~~~~~~~~~~~~~~~~~~~~~~
            btrace_insn_number

Add the necessary include.

Change-Id: I10b967584645961c86167a8395d88929a42bef03

gdb/charset.c

index 4c1debef61433bcf90b0d9436cc80aebb7fb1890..17a9ca81b2eb4f772f7d0f5b1b71c1aec9c7f559 100644 (file)
@@ -71,6 +71,8 @@
 \f
 #ifdef PHONY_ICONV
 
+#include "extract-store-integer.h"
+
 /* Provide a phony iconv that does as little as possible.  Also,
    arrange for there to be a single available character set.  */