summaryrefslogtreecommitdiff
path: root/data/libresolv
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2008-04-06 10:28:29 +0000
committerJay Freeman <saurik@saurik.com>2008-04-06 10:28:29 +0000
commitd699a01fabaa04a1aad60f6ca5777f82ee24839a (patch)
tree1eb62bad23b14a0877c5b9171f2a5f9358c8d592 /data/libresolv
parent8a49e427447f40fdd43fc4b5f513b166dd639e2a (diff)
Drastic, sweeping modifications to support iPhone 1.2.0/2.0.
git-svn-id: http://svn.telesphoreo.org/trunk@199 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/libresolv')
-rw-r--r--data/libresolv/make.sh6
-rw-r--r--data/libresolv/pselect.diff22
2 files changed, 27 insertions, 1 deletions
diff --git a/data/libresolv/make.sh b/data/libresolv/make.sh
index 96cb9c2eb..874174bc2 100644
--- a/data/libresolv/make.sh
+++ b/data/libresolv/make.sh
@@ -1,6 +1,10 @@
pkg:extract
cd *
+pkg:patch
cp -a "${PKG_DATA}"/*.[ch] .
-arm-apple-darwin-gcc -fno-common !(dns_async).c -o libresolv.dylib -dynamiclib -I. -DkDNSServiceFlagsReturnIntermediates=0x1000 -linfo -install_name /usr/lib/libresolv.dylib
+declare -a flags
+# XXX: don't use this on darwin8
+flags[${#flags[@]}]=-DNEED_PSELECT
+"${PKG_TARG}-gcc" -fno-common !(dns_async).c -o libresolv.dylib -dynamiclib -I. -linfo -install_name /usr/lib/libresolv.dylib "${flags[@]}"
pkg: mkdir -p /usr/lib
pkg: cp -a libresolv.dylib /usr/lib
diff --git a/data/libresolv/pselect.diff b/data/libresolv/pselect.diff
new file mode 100644
index 000000000..192eee992
--- /dev/null
+++ b/data/libresolv/pselect.diff
@@ -0,0 +1,22 @@
+diff -ru libresolv-19/res_send.c libresolv-19+iPhone/res_send.c
+--- libresolv-19/res_send.c 2007-10-05 00:02:17.000000000 +0000
++++ libresolv-19+iPhone/res_send.c 2008-04-04 20:18:45.000000000 +0000
+@@ -141,7 +141,8 @@
+ static void Perror(const res_state, FILE *, const char *, int);
+ static int sock_eq(struct sockaddr *, struct sockaddr *);
+ #ifdef NEED_PSELECT
+-static int pselect(int, void *, void *, void *, struct timespec *, const sigset_t *);
++static int pselect_(int, void *, void *, void *, struct timespec *, const sigset_t *);
++#define pselect pselect_
+ #endif
+
+ static const int niflags = NI_NUMERICHOST | NI_NUMERICSERV;
+@@ -1414,7 +1415,7 @@
+ #ifdef NEED_PSELECT
+ /* XXX needs to move to the porting library. */
+ static int
+-pselect(int nfds, void *rfds, void *wfds, void *efds, struct timespec *tsp, const sigset_t *sigmask)
++pselect_(int nfds, void *rfds, void *wfds, void *efds, struct timespec *tsp, const sigset_t *sigmask)
+ {
+ struct timeval tv, *tvp = NULL;
+ sigset_t sigs;