void-packages/srcpkgs/mysql++/patches/01-fix-cross.patch

31 lines
731 B
Diff

Index: lib/datetime.cpp
==================================================================
--- a/lib/datetime.cpp
+++ b/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)