From 830a06627461e55d68c30a10b7bc358eb3fc5a62 Mon Sep 17 00:00:00 2001 From: Calvin Hill Date: Sun, 13 Jan 2019 00:39:39 +0000 Subject: Fix build of fuzztests. diff --git a/suite/fuzz/driverbin.c b/suite/fuzz/driverbin.c index c5676dd..1ac5b72 100644 --- a/suite/fuzz/driverbin.c +++ b/suite/fuzz/driverbin.c @@ -3,6 +3,7 @@ #include #include #include +#include int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size); const char * cs_fuzz_arch(uint8_t arch); @@ -14,6 +15,7 @@ int main(int argc, char** argv) size_t Size; DIR *d; struct dirent *dir; + struct stat s; int r = 0; int i; @@ -34,10 +36,16 @@ int main(int argc, char** argv) while((dir = readdir(d)) != NULL) { //opens the file, get its size, and reads it into a buffer + #ifndef __HAIKU__ if (dir->d_type != DT_REG) { continue; } - + else + stat(dir->d_name, &s); + if(!S_ISREG(s.st_mode)){ + continue; + } + #endif printf("Running %s\n", dir->d_name); fflush(stdout); -- 2.50.1 From 18993539e53fda342b98608932161e9a80c05a7e Mon Sep 17 00:00:00 2001 From: Luc Schrijvers Date: Sat, 30 Aug 2025 11:37:24 +0200 Subject: Fix building with cmake > 4 diff --git a/CMakeLists.txt b/CMakeLists.txt index 197b6ba..9b4e36b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ if (POLICY CMP0048) # compatibility. change OLD to NEW when minimum cmake version is updated to 3.* and # set VERSION using project(capstone VERSION 4.0.0). # http://www.cmake.org/cmake/help/v3.0/policy/CMP0048.html - cmake_policy (SET CMP0048 OLD) + cmake_policy (SET CMP0048 NEW) endif() # to configure the options specify them in in the command line or change them in the cmake UI. -- 2.50.1