[t:2631] [t:2623] Fix windows build broken by r20413.

Implement "strerror_r" in windows

git-svn-id: file:///svn/toku/tokudb@20565 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
Yoni Fogel 2013-04-16 23:59:15 -04:00
parent 6af1a32e4e
commit f1a67d8133
2 changed files with 8 additions and 0 deletions

View file

@ -83,6 +83,8 @@ int mkstemp(char * ttemplate);
toku_off_t ftello(FILE *stream);
int strerror_r(int errnum, char *buf, size_t buflen);
#define __builtin_offsetof(type, member) offsetof(type, member)

View file

@ -19,6 +19,7 @@
#include <sys/types.h>
#include <fcntl.h>
#include <Crtdbg.h>
#include <string.h>
static int
toku_malloc_init(void) {
@ -368,3 +369,8 @@ toku_get_filesystem_sizes(const char *path, uint64_t *avail_size, uint64_t *free
return r;
}
int strerror_r(int errnum, char *buf, size_t buflen) {
int r = strerror_s(buf, buflen, errnum);
return r;
}