Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Feb 2022 16:07:44 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: c9cabf9aa6fe - main - Explicitly include semaphore.h for struct _sem in fusefs setattr test
Message-ID:  <202202061607.216G7ixJ036606@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=c9cabf9aa6feb542776333fe5e915a3464f89e3c

commit c9cabf9aa6feb542776333fe5e915a3464f89e3c
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-02-06 16:07:16 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-02-06 16:07:28 +0000

    Explicitly include semaphore.h for struct _sem in fusefs setattr test
    
    In libc++'s __threading_support header the semaphore.h header was
    implicitly included, but from version 14 onwards, this is no longer the
    case, resulting in compile errors:
    
    tests/sys/fs/fusefs/setattr.cc:740:8: error: variable has incomplete type 'sem_t' (aka '_sem')
            sem_t sem;
                  ^
    tests/sys/fs/fusefs/utils.hh:33:8: note: forward declaration of '_sem'
    struct _sem;
           ^
    
    MFC after:      3 days
---
 tests/sys/fs/fusefs/setattr.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/sys/fs/fusefs/setattr.cc b/tests/sys/fs/fusefs/setattr.cc
index e4458db9f8ee..00b37ec7965a 100644
--- a/tests/sys/fs/fusefs/setattr.cc
+++ b/tests/sys/fs/fusefs/setattr.cc
@@ -34,6 +34,7 @@ extern "C" {
 #include <sys/stat.h>
 
 #include <fcntl.h>
+#include <semaphore.h>
 }
 
 #include "mockfs.hh"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202202061607.216G7ixJ036606>