git: c9cabf9aa6fe - main - Explicitly include semaphore.h for struct _sem in fusefs setattr test

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Sun, 06 Feb 2022 16:07:44 UTC
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"