This commit is contained in:
tihmstar 2016-11-28 11:23:13 +01:00
parent 75edbc31a6
commit 2bc7dd6071
2 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -11,6 +11,7 @@
#include "config.h"
#include <stdio.h>
#include <functional>
#include "idevicerestore.h"
#include "jsmn.h"
@ -18,7 +19,7 @@ using namespace std;
template <typename T>
class ptr_smart {
function<void(T)> _ptr_free = NULL;
std::function<void(T)> _ptr_free = NULL;
public:
T _p;
ptr_smart(T p, function<void(T)> ptr_free){static_assert(is_pointer<T>(), "error: this is for pointers only\n"); _p = p;_ptr_free = ptr_free;}