-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Description
When compiling with msvc on Windows unistd.h is not available in leveldb/c.cc.
Excluding the header and also adding a definition for ssize_t and undefining _snprintf in port_win.h allows compilation to succeed.
db/c.cc
#include <stdlib.h>
#ifndef WIN32
#include <unistd.h>
#endif
#include "leveldb/cache.h"
port/port_win.h
#ifdef _MSC_VER
//#define snprintf _snprintf
#define close _close
#define fread_unlocked _fread_nolock
#include <stdint.h>
#ifdef _WIN64
typedef int64_t ssize_t;
#else
typedef int32_t ssize_t;
#endif
#endif
#include <string>
Metadata
Metadata
Assignees
Labels
No labels