Skip to content
  • Vitaly Kuznetsov's avatar
    selftests: kvm: fix build with glibc >= 2.30 · e37f9f13
    Vitaly Kuznetsov authored
    
    
    Glibc-2.30 gained gettid() wrapper, selftests fail to compile:
    
    lib/assert.c:58:14: error: static declaration of ‘gettid’ follows non-static declaration
       58 | static pid_t gettid(void)
          |              ^~~~~~
    In file included from /usr/include/unistd.h:1170,
                     from include/test_util.h:18,
                     from lib/assert.c:10:
    /usr/include/bits/unistd_ext.h:34:16: note: previous declaration of ‘gettid’ was here
       34 | extern __pid_t gettid (void) __THROW;
          |                ^~~~~~
    
    Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    e37f9f13