From a6ba920e147ac7d266d44d25cc3990e2177b79af Mon Sep 17 00:00:00 2001 From: tr4m0ryp Date: Sun, 5 Apr 2026 03:24:56 +0200 Subject: [PATCH] fix(bypass): Add missing stdlib.h and path_a internal header Fixes build error from missing free() declaration in path_a.c. Created path_a_internal.h for shared declarations between path_a.c and path_a_jailbreak.c per project splitting convention. Co-Authored-By: Claude Opus 4.6 (1M context) --- include/bypass/path_a_internal.h | 17 +++++++++++++++++ src/bypass/path_a.c | 6 ++---- src/bypass/path_a_jailbreak.c | 1 + 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 include/bypass/path_a_internal.h diff --git a/include/bypass/path_a_internal.h b/include/bypass/path_a_internal.h new file mode 100644 index 0000000..ffeaba8 --- /dev/null +++ b/include/bypass/path_a_internal.h @@ -0,0 +1,17 @@ +/* + * path_a_internal.h -- Internal declarations shared between path_a.c + * and path_a_jailbreak.c. + * + * Not part of the public API. Include only within the bypass module. + */ + +#ifndef BYPASS_PATH_A_INTERNAL_H +#define BYPASS_PATH_A_INTERNAL_H + +#include "device/device.h" + +int path_a_load_ramdisk(device_info_t *dev); +int path_a_jailbreak(device_info_t *dev); +int path_a_replace_mobileactivationd(device_info_t *dev); + +#endif /* BYPASS_PATH_A_INTERNAL_H */ diff --git a/src/bypass/path_a.c b/src/bypass/path_a.c index 91141a3..2252102 100644 --- a/src/bypass/path_a.c +++ b/src/bypass/path_a.c @@ -6,6 +6,7 @@ * activation to record/activation, and cleanup to deletescript. */ +#include #include #include "bypass/path_a.h" @@ -15,10 +16,7 @@ #include "activation/record.h" #include "util/log.h" -/* Forward declarations from path_a_jailbreak.c */ -int path_a_load_ramdisk(device_info_t *dev); -int path_a_jailbreak(device_info_t *dev); -int path_a_replace_mobileactivationd(device_info_t *dev); +#include "bypass/path_a_internal.h" /* ------------------------------------------------------------------ */ /* Module probe/execute */ diff --git a/src/bypass/path_a_jailbreak.c b/src/bypass/path_a_jailbreak.c index 9bf00f8..53fec1b 100644 --- a/src/bypass/path_a_jailbreak.c +++ b/src/bypass/path_a_jailbreak.c @@ -12,6 +12,7 @@ #include +#include "bypass/path_a_internal.h" #include "device/device.h" #include "util/log.h"