Skip to content

Commit 28009ec

Browse files
sethjacksonjkotas
andauthored
Fix some CMake definitions on OpenBSD (#125294)
* Need `sys/types.h` for `HAVE_STATFS_FSTYPENAME`. See https://man.openbsd.org/statfs (missed a couple of places in #124992). * Need `sys/types.h` for `HAVE_MNTINFO`. See: https://man.openbsd.org/getmntinfo * Need `sys/types.h` and `sys/socket.h` for `HAVE_GETPEEREID`. See: https://man.openbsd.org/getpeereid Contributes to #124911. Co-authored-by: Jan Kotas <jkotas@microsoft.com>
1 parent e429373 commit 28009ec

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/coreclr/gc/unix/configure.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ int main(int argc, char **argv)
148148
check_struct_has_member(
149149
"struct statfs"
150150
f_fstypename
151-
"sys/mount.h"
151+
"sys/types.h;sys/mount.h"
152152
HAVE_STATFS_FSTYPENAME)
153153

154154
check_struct_has_member(

src/coreclr/pal/src/configure.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ endif(CLR_CMAKE_TARGET_APPLE)
630630
check_struct_has_member(
631631
"struct statfs"
632632
f_fstypename
633-
"sys/mount.h"
633+
"sys/types.h;sys/mount.h"
634634
HAVE_STATFS_FSTYPENAME)
635635

636636
check_struct_has_member(

src/native/libs/configure.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ check_symbol_exists(
203203

204204
check_symbol_exists(
205205
getmntinfo
206-
sys/mount.h
206+
"sys/types.h;sys/mount.h"
207207
HAVE_MNTINFO)
208208

209209
check_symbol_exists(
@@ -974,7 +974,7 @@ check_include_files(
974974

975975
check_symbol_exists(
976976
getpeereid
977-
unistd.h
977+
"unistd.h;sys/types.h;sys/socket.h"
978978
HAVE_GETPEEREID)
979979

980980
check_symbol_exists(

0 commit comments

Comments
 (0)