From nobody Sun Feb 8 11:59:26 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1599111977; cv=none; d=zohomail.com; s=zohoarc; b=RF0AokVegQvjnIof0gDe2jc738SaeBFOVvW042YQ1DA6Up9N52lS7/UfJwO/1xqYhBiFqbAVtTu8QF9Xk7Mx4P6UDfBaHFKBOomVl/n48SyiRYy3uxEMGPRLSd5xRqmEtBrLRnOgGYGqKg1MTFVnvBxu9qvsNWiBc3mKiBU5Knc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599111977; h=Content-Type:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To; bh=5To05iZyCKjCChYbkY8p3ROFswdIR4gTrfcFvLIeb7w=; b=KMqkK25jtUxFarYyQt7VSCO2zeSQeyrgfXjxT62JVR9+1BQDSc3KMxK7TS9yOEGxCbzB8KA3G5QJ0FSOGdkTt8XsvoP7T6GJewSdUHspmvyQooNi+6OKrCzSYuXQhCF/nC+1bD1Cf12TRL+PhVD+i7BpA5mDqtRxzfIPRlPZDFo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1599111977274835.2867056841258; Wed, 2 Sep 2020 22:46:17 -0700 (PDT) Received: from localhost ([::1]:53312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDi4e-0000dC-Ff for importer@patchew.org; Thu, 03 Sep 2020 01:46:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDi3f-000063-02 for qemu-devel@nongnu.org; Thu, 03 Sep 2020 01:45:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:21592) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kDi3b-0006fR-2e for qemu-devel@nongnu.org; Thu, 03 Sep 2020 01:45:14 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-98-yDVDMx2YPna7bCDDFYAAVg-1; Thu, 03 Sep 2020 01:45:07 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 963BB801AE0 for ; Thu, 3 Sep 2020 05:45:06 +0000 (UTC) Received: from thuth.com (ovpn-112-90.ams2.redhat.com [10.36.112.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id 74E187E670; Thu, 3 Sep 2020 05:45:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599111909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type; bh=5To05iZyCKjCChYbkY8p3ROFswdIR4gTrfcFvLIeb7w=; b=c8rUORF11lndEkvVL16vHe0UmbqYWHRlP5ERSJ9ss8mKLAe/k1iuIMFM1x0Jii/DJYvBC8 k91QQddxUafHer+sxghbiP9pMdebYobThrk/PdFRmt2gpy4A47q92m9Zd0SDEQhH3ecTz0 uZN40Uazxkhv5bsXH3FB88cHM88mgjo= X-MC-Unique: yDVDMx2YPna7bCDDFYAAVg-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PATCH] stubs: Move qemu_fd_register stub to util/main-loop.c Date: Thu, 3 Sep 2020 07:45:03 +0200 Message-Id: <20200903054503.425435-1-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=63.128.21.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/02 23:55:14 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The linker of MinGW sometimes runs into the following problem: libqemuutil.a(util_main-loop.c.obj): In function `qemu_fd_register': /builds/huth/qemu/build/../util/main-loop.c:331: multiple definition of `qemu_fd_register' libqemuutil.a(stubs_fd-register.c.obj):/builds/huth/qemu/stubs/fd-register.= c:5: first defined here collect2: error: ld returned 1 exit status /builds/huth/qemu/rules.mak:88: recipe for target 'tests/test-timed-average= .exe' failed qemu_fd_register() is defined in util/main-loop.c for WIN32, so let's simply move the stub also there in the #else part of the corresponding #ifndef to fix this problem. Signed-off-by: Thomas Huth Acked-by: Paolo Bonzini Reviewed-by: Daniel P. Berrang=C3=A9 --- stubs/fd-register.c | 6 ------ stubs/meson.build | 1 - util/main-loop.c | 4 ++++ 3 files changed, 4 insertions(+), 7 deletions(-) delete mode 100644 stubs/fd-register.c diff --git a/stubs/fd-register.c b/stubs/fd-register.c deleted file mode 100644 index 63a4abdb20..0000000000 --- a/stubs/fd-register.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "qemu/osdep.h" -#include "qemu/main-loop.h" - -void qemu_fd_register(int fd) -{ -} diff --git a/stubs/meson.build b/stubs/meson.build index e2dfedc2a7..e0b322bc28 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -9,7 +9,6 @@ stub_ss.add(files('cpu-get-clock.c')) stub_ss.add(files('cpu-get-icount.c')) stub_ss.add(files('dump.c')) stub_ss.add(files('error-printf.c')) -stub_ss.add(files('fd-register.c')) stub_ss.add(files('fdset.c')) stub_ss.add(files('fw_cfg.c')) stub_ss.add(files('gdbstub.c')) diff --git a/util/main-loop.c b/util/main-loop.c index f69f055013..217c8d6056 100644 --- a/util/main-loop.c +++ b/util/main-loop.c @@ -179,6 +179,10 @@ static int max_priority; static int glib_pollfds_idx; static int glib_n_poll_fds; =20 +void qemu_fd_register(int fd) +{ +} + static void glib_pollfds_fill(int64_t *cur_timeout) { GMainContext *context =3D g_main_context_default(); --=20 2.18.2