solve linking error when python is not available

This commit is contained in:
Andrea Fioraldi
2020-03-07 14:26:33 +01:00
parent 172d384bf2
commit ed5d65b54f
2 changed files with 7 additions and 2 deletions

View File

@ -647,8 +647,6 @@ extern PyObject* py_functions[PY_FUNC_COUNT];
/* Custom mutators */
void setup_custom_mutator(void);
void destroy_custom_mutator(void);
void load_custom_mutator(const char*);
void load_custom_mutator_py(const char*);
u8 trim_case_custom(char** argv, struct queue_entry* q, u8* in_buf);
/* Python */

View File

@ -25,6 +25,11 @@
#include "afl-fuzz.h"
void load_custom_mutator(const char*);
#ifdef USE_PYTHON
void load_custom_mutator_py(const char*);
#endif
void setup_custom_mutator(void) {
/* Try mutator library first */
@ -286,6 +291,7 @@ abort_trimming:
}
#ifdef USE_PYTHON
void load_custom_mutator_py(const char* module_name) {
mutator = ck_alloc(sizeof(struct custom_mutator));
@ -325,3 +331,4 @@ void load_custom_mutator_py(const char* module_name) {
mutator->afl_custom_init(UR(0xFFFFFFFF));
}
#endif