void-packages/srcpkgs/mysql++/patches/01-fix-cross.patch
2018-08-27 12:28:49 +02:00

30 lines
727 B
Diff

Index: lib/datetime.cpp
==================================================================
--- lib/datetime.cpp
+++ lib/datetime.cpp
@@ -30,10 +30,11 @@
#include "datetime.h"
#include "stream2string.h"
#include <iomanip>
+#include <cstring>
#include <stdlib.h>
#include <time.h>
using namespace std;
@@ -51,11 +52,11 @@
localtime_r(&t, ptm);
#else
// No explicitly thread-safe localtime() replacement found. This
// may still be thread-safe, as some C libraries take special steps
// within localtime() to get thread safety, such as TLS.
- memcpy(ptm, localtime(&t), sizeof(tm));
+ std::memcpy(ptm, localtime(&t), sizeof(tm));
#endif
}
std::ostream& operator <<(std::ostream& os, const Date& d)