git: 9c6aee3eff23 - stable/12 - Explicitly include semaphore.h for struct _sem in fusefs setattr test

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Wed, 09 Feb 2022 17:28:44 UTC
The branch stable/12 has been updated by dim:

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

commit 9c6aee3eff239cc90a48dfe2ec39d2779255250f
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-02-06 16:07:16 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-02-09 17:26:34 +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
    
    (cherry picked from commit c9cabf9aa6feb542776333fe5e915a3464f89e3c)
---
 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"