Skip to content
  • Thomas Huth's avatar
    8c278762
    stubs: Move qemu_fd_register stub to util/main-loop.c · 8c278762
    Thomas Huth authored
    
    
    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.
    
    Message-Id: <20200903054503.425435-1-thuth@redhat.com>
    Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
    Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
    8c278762
    stubs: Move qemu_fd_register stub to util/main-loop.c
    Thomas Huth authored
    
    
    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.
    
    Message-Id: <20200903054503.425435-1-thuth@redhat.com>
    Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
    Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
Loading