Fixed config load for MSVC.
This commit is contained in:
parent
9cb7d727c2
commit
e3dd4a6581
5 changed files with 17 additions and 6 deletions
8
src/3rdparty/jansson/dump.c
vendored
8
src/3rdparty/jansson/dump.c
vendored
|
@ -19,10 +19,16 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
|
||||
#if defined(HAVE_UNISTD_H) && !defined(_MSC_VER)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#include <BaseTsd.h>
|
||||
typedef SSIZE_T ssize_t;
|
||||
#endif
|
||||
|
||||
#include "jansson.h"
|
||||
#include "strbuffer.h"
|
||||
#include "utf.h"
|
||||
|
|
2
src/3rdparty/jansson/hashtable_seed.c
vendored
2
src/3rdparty/jansson/hashtable_seed.c
vendored
|
@ -21,7 +21,7 @@
|
|||
#include <sched.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#if defined(HAVE_UNISTD_H) && !defined(_MSC_VER)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -92,9 +92,7 @@
|
|||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#ifndef _MSC_VER
|
||||
# define HAVE_UNISTD_H 1
|
||||
#endif
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if the system has the type 'unsigned long long int'. */
|
||||
#define HAVE_UNSIGNED_LONG_LONG_INT 1
|
||||
|
|
7
src/3rdparty/jansson/load.c
vendored
7
src/3rdparty/jansson/load.c
vendored
|
@ -17,10 +17,15 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
|
||||
#if defined(HAVE_UNISTD_H) && !defined(_MSC_VER)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define STDIN_FILENO 0
|
||||
#endif
|
||||
|
||||
#include "jansson.h"
|
||||
#include "strbuffer.h"
|
||||
#include "utf.h"
|
||||
|
|
|
@ -506,6 +506,8 @@ void Options::parseConfig(const char *fileName)
|
|||
return;
|
||||
}
|
||||
|
||||
uv_fs_req_cleanup(&req);
|
||||
|
||||
json_error_t err;
|
||||
json_t *config = json_loadfd(fd, 0, &err);
|
||||
|
||||
|
|
Loading…
Reference in a new issue