Skip to content

Commit

Permalink
Explicitly include semaphore.h for struct _sem in fusefs setattr test
Browse files Browse the repository at this point in the history
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 c9cabf9)
  • Loading branch information
DimitryAndric committed Feb 9, 2022
1 parent 4cd49ed commit 01cccd7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/sys/fs/fusefs/setattr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ extern "C" {
#include <sys/stat.h>

#include <fcntl.h>
#include <semaphore.h>
}

#include "mockfs.hh"
Expand Down

0 comments on commit 01cccd7

Please sign in to comment.