diff options
author | fjoe <fjoe@FreeBSD.org> | 2007-11-29 12:06:19 +0800 |
---|---|---|
committer | fjoe <fjoe@FreeBSD.org> | 2007-11-29 12:06:19 +0800 |
commit | 7202cea1c5dc39ec992f7265b9f2936c27fbaa34 (patch) | |
tree | a6f629ee05cf01707de9bbe4f1ab827a29d4a7fd /databases | |
parent | bc12c962fd4f80c4806b182b48233ea8fd9b3852 (diff) | |
download | freebsd-ports-gnome-7202cea1c5dc39ec992f7265b9f2936c27fbaa34.tar.gz freebsd-ports-gnome-7202cea1c5dc39ec992f7265b9f2936c27fbaa34.tar.zst freebsd-ports-gnome-7202cea1c5dc39ec992f7265b9f2936c27fbaa34.zip |
Fix connect() for kernels without COMPAT_43.
Approved by: portmgr (linimon)
Diffstat (limited to 'databases')
-rw-r--r-- | databases/oracle8-client/Makefile | 4 | ||||
-rw-r--r-- | databases/oracle8-client/files/patch-freebsd-oci8stub.c | 39 | ||||
-rw-r--r-- | databases/oracle8-client/files/patch-freebsd-redefine-syms.lst | 6 |
3 files changed, 47 insertions, 2 deletions
diff --git a/databases/oracle8-client/Makefile b/databases/oracle8-client/Makefile index b6005e94c7e3..db6eac714e6f 100644 --- a/databases/oracle8-client/Makefile +++ b/databases/oracle8-client/Makefile @@ -7,6 +7,7 @@ PORTNAME= oracle8-client PORTVERSION= 0.2.0 +PORTREVISION= 1 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= fjoe @@ -22,9 +23,8 @@ ORACLE_HOME= ${PREFIX}/${PORTNAME} .include <bsd.port.pre.mk> do-build: -.if ${OSVERSION} < 700000 + @cd ${WRKSRC}/freebsd && ./redefine-syms.sh ../lib/libclntst8.a @cd ${WRKSRC}/freebsd && ${MAKE} all patch clean ORACLE_HOME=${WRKSRC} -.endif do-install: @${MKDIR} ${ORACLE_HOME} diff --git a/databases/oracle8-client/files/patch-freebsd-oci8stub.c b/databases/oracle8-client/files/patch-freebsd-oci8stub.c new file mode 100644 index 000000000000..0ab25e92e0d3 --- /dev/null +++ b/databases/oracle8-client/files/patch-freebsd-oci8stub.c @@ -0,0 +1,39 @@ +--- freebsd/oci8stub.c.orig 2007-11-11 12:25:01.000000000 +0600 ++++ freebsd/oci8stub.c 2007-11-28 05:03:13.000000000 +0600 +@@ -2,6 +2,7 @@ + #include <sys/param.h> + #include <sys/stat.h> + #include <sys/resource.h> ++#include <sys/socket.h> + #include <assert.h> + #include <errno.h> + #include <dlfcn.h> +@@ -119,6 +120,13 @@ + + int __l_sigprocmask(int how, const sigset_t *set, sigset_t *oldset); + ++struct l_sockaddr { ++ u_int16_t sa_family; ++ char sa_data[14]; ++}; ++ ++int __l_connect(int s, const struct l_sockaddr *l_sa, socklen_t addrlen); ++ + #ifdef stdin + #undef stdin + #undef stdout +@@ -528,3 +536,14 @@ + + return sigprocmask(how, set, oldset); + } ++ ++int ++__l_connect(int s, const struct l_sockaddr *l_sa, socklen_t addrlen) ++{ ++ struct sockaddr sa; ++ ++ memcpy(sa.sa_data, l_sa->sa_data, sizeof(sa.sa_data)); ++ sa.sa_len = addrlen; ++ sa.sa_family = l_sa->sa_family; ++ return connect(s, &sa, addrlen); ++} diff --git a/databases/oracle8-client/files/patch-freebsd-redefine-syms.lst b/databases/oracle8-client/files/patch-freebsd-redefine-syms.lst new file mode 100644 index 000000000000..f3ecc4d6dbc6 --- /dev/null +++ b/databases/oracle8-client/files/patch-freebsd-redefine-syms.lst @@ -0,0 +1,6 @@ +--- freebsd/redefine-syms.lst.orig 2005-06-20 23:23:35.000000000 +0700 ++++ freebsd/redefine-syms.lst 2007-11-28 04:48:03.000000000 +0600 +@@ -1,2 +1,3 @@ ++connect __l_connect + lseek __l_lseek + sigprocmask __l_sigprocmask |