diff options
author | B. Stack <bgstack15@gmail.com> | 2022-10-11 11:16:39 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-10-11 11:16:39 -0400 |
commit | cab22f2dc3c5f41b5163f74cbb233e390edff6ff (patch) | |
tree | a49cfd729d9793681a57fa6f7409b0f0848e9ede /zen/guid.h | |
parent | Merge branch 'b11.25' into 'master' (diff) | |
download | FreeFileSync-cab22f2dc3c5f41b5163f74cbb233e390edff6ff.tar.gz FreeFileSync-cab22f2dc3c5f41b5163f74cbb233e390edff6ff.tar.bz2 FreeFileSync-cab22f2dc3c5f41b5163f74cbb233e390edff6ff.zip |
add upstream 11.26
Diffstat (limited to 'zen/guid.h')
-rw-r--r-- | zen/guid.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -25,7 +25,7 @@ std::string generateGUID() //creates a 16-byte GUID #endif #if __GLIBC_PREREQ(2, 25) //getentropy() requires Glibc 2.25 (ldd --version) PS: CentOS 7 is on 2.17 - if (::getentropy(&guid[0], guid.size()) != 0) //"The maximum permitted value for the length argument is 256" + if (::getentropy(guid.data(), guid.size()) != 0) //"The maximum permitted value for the length argument is 256" throw std::runtime_error(std::string(__FILE__) + '[' + numberTo<std::string>(__LINE__) + "] Failed to generate GUID." + "\n\n" + utfTo<std::string>(formatSystemError("getentropy", errno))); #else @@ -58,7 +58,7 @@ std::string generateGUID() //creates a 16-byte GUID const int fd_ = ::open("/dev/urandom", O_RDONLY | O_CLOEXEC); }; thread_local RandomGeneratorPosix gen; - gen.getBytes(&guid[0], guid.size()); + gen.getBytes(guid.data(), guid.size()); #endif return guid; |