From 0209cce51675512f80e740ce45d568ed6d0029c0 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 28 Dec 2016 00:30:34 -0800 Subject: Compile Cydia to arm64 by linking with APT 1.4~b1. --- apt.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 apt.h (limited to 'apt.h') diff --git a/apt.h b/apt.h new file mode 100644 index 0000000..c00968c --- /dev/null +++ b/apt.h @@ -0,0 +1,30 @@ +#ifndef APT_H +#define APT_H + +#include + +template +Type_ *memrchr(Type_ *data, int value, int size) { + for (int i = 0; i != size; ++i) + if (data[size - i - 1] == value) + return data + size - i - 1; + return 0; +} + +template +static Type_ *strchrnul(Type_ *s, int c) { + while (*s != c && *s != '\0') + ++s; + return s; +} + +#define faccessat(arg0, arg1, arg2, arg3) \ + access(arg1, arg2) + +#if 0 +#include +static unsigned nonce(0); +#define _trace() syslog(LOG_ERR, "_trace():%s[%u] #%u\n", __FILE__, __LINE__, ++nonce) +#endif + +#endif//APT_H -- cgit v1.2.3