diff --git a/Makefile b/Makefile index 536eee71..b2d23a03 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ CXX = g++ CC = gcc INCLUDE += -I futurerestore -I /opt/local/include -I external/idevicerestore/src -I external/tsschecker/tsschecker -I external/img4tool/img4tool CFLAGS += $(INCLUDE) -Wall -std=c11 -D HAVE_CONFIG_H=1 -CXXFLAGS += $(INCLUDE) -Wall -std=c++11 +CXXFLAGS += $(INCLUDE) -Wall -std=c++11 -stdlib=libc++ LDFLAGS += -lirecovery -limobiledevice -lcrypto -lcurl -lplist -lc -lc++ -lzip -lpartialzip-1.0 -lz diff --git a/futurerestore/futurerestore.hpp b/futurerestore/futurerestore.hpp index 271a2f85..5d70c615 100644 --- a/futurerestore/futurerestore.hpp +++ b/futurerestore/futurerestore.hpp @@ -11,6 +11,7 @@ #include "config.h" #include +#include #include "idevicerestore.h" #include "jsmn.h" @@ -18,7 +19,7 @@ using namespace std; template class ptr_smart { - function _ptr_free = NULL; + std::function _ptr_free = NULL; public: T _p; ptr_smart(T p, function ptr_free){static_assert(is_pointer(), "error: this is for pointers only\n"); _p = p;_ptr_free = ptr_free;}