From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 8A95E385DC35 for ; Mon, 10 Aug 2020 15:27:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8A95E385DC35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id B9020AEFC for ; Mon, 10 Aug 2020 15:27:23 +0000 (UTC) Date: Mon, 10 Aug 2020 17:27:02 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][sim] Fix mbuild build breaker in sim-cpu.c Message-ID: <20200810152700.GA15288@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Aug 2020 15:27:05 -0000 Hi, When running gdb/gdb_mbuild.sh, I run into: ... src/sim/aarch64/../common/sim-cpu.c: In function 'sim_cpu_free': src/sim/aarch64/../common/sim-cpu.c:64:3: error: implicit declaration of \ function 'free' [-Werror=implicit-function-declaration] free (cpu); ^~~~ src/sim/aarch64/../common/sim-cpu.c:64:3: error: incompatible implicit \ declaration of built-in function 'free' [-Werror] src/sim/aarch64/../common/sim-cpu.c:64:3: note: include '' or \ provide a declaration of 'free' ... Fix this by adding "#include ". Tested by gdb/gdb_mbuild.sh -e aarch64-elf. Committed to trunk. Thanks, - Tom [sim] Fix mbuild build breaker in sim-cpu.c sim/common/ChangeLog: 2020-08-10 Tom de Vries * sim-cpu.c: Include stdlib.h for free. --- sim/common/sim-cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sim/common/sim-cpu.c b/sim/common/sim-cpu.c index 1715508e2f..d1676d4831 100644 --- a/sim/common/sim-cpu.c +++ b/sim/common/sim-cpu.c @@ -17,6 +17,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#include + #include "sim-main.h" #include "bfd.h"