openbsd-ports/devel/cmake/patches/patch-Source_kwsys_SystemTools_cxx
sthen c7b1925252 backout to cmake 3.10.2 to unbreak ports at least on i386, maybe others, ok jca
3.11.2 has issues along these lines:

cmQtAutoGeneratorMocUic.cxx:(.text+0x8e8b): undefined reference to `operator new(unsigned long, std::align_val_t)'
cmQtAutoGeneratorMocUic.cxx:(.text+0x8ebf): undefined reference to `operator delete(void*, std::align_val_t)'
2018-06-14 17:04:45 +00:00

24 lines
651 B
Plaintext

$OpenBSD: patch-Source_kwsys_SystemTools_cxx,v 1.24 2018/06/14 17:04:45 sthen Exp $
Don't spam systrace by attempting to create dirs which already exist
Index: Source/kwsys/SystemTools.cxx
--- Source/kwsys/SystemTools.cxx.orig
+++ Source/kwsys/SystemTools.cxx
@@ -279,12 +279,14 @@ inline void Realpath(const std::string& path, std::str
}
#else
#include <sys/types.h>
+#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
inline int Mkdir(const std::string& dir)
{
- return mkdir(dir.c_str(), 00777);
+ struct stat sb;
+ return stat(dir.c_str(), &sb) && mkdir(dir.c_str(), 00777);
}
inline int Rmdir(const std::string& dir)
{