Fix compiling with libc++

This commit is contained in:
Michael Cook (mackal) 2018-04-27 21:41:52 -04:00
parent fdcd39398c
commit 4fe6836cf0
4 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,4 @@
#include "event_sub.h" #include "event_sub.h"
#include <string.h>
void EventSubscriptionWatcher::Subscribe(const std::string &event_name) void EventSubscriptionWatcher::Subscribe(const std::string &event_name)
{ {

View File

@ -1,6 +1,7 @@
#pragma once #pragma once
#include <unordered_map> #include <unordered_map>
#include <string>
class EventSubscriptionWatcher class EventSubscriptionWatcher
{ {

View File

@ -6,6 +6,7 @@
#include <windows.h> #include <windows.h>
#endif #endif
#include <string>
#include <mysql.h> #include <mysql.h>
#include "types.h" #include "types.h"
#include "mysql_request_row.h" #include "mysql_request_row.h"

View File

@ -6,6 +6,10 @@
#include <EXTERN.h> #include <EXTERN.h>
#define WIN32IO_IS_STDIO #define WIN32IO_IS_STDIO
// header to detect if libc++ is the std lib
// this doesn't do shit for C++ but libc++ and GCC 6.1+ use it to define some macros
#include <ciso646>
#ifndef WIN32 #ifndef WIN32
extern "C" { //the perl headers dont do this for us... extern "C" { //the perl headers dont do this for us...
#endif #endif
@ -47,7 +51,7 @@ extern "C" { //the perl headers dont do this for us...
#endif #endif
//These need to be cleaned up on FreeBSD //These need to be cleaned up on FreeBSD
#ifdef __FreeBSD__ #if defined(__FreeBSD__) || defined(_LIBCPP_VERSION)
#ifdef do_open #ifdef do_open
#undef do_open #undef do_open
#endif #endif