mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-21 04:06:46 +00:00
Fix connect() for kernels without COMPAT_43.
Approved by: portmgr (linimon)
This commit is contained in:
parent
438f72539d
commit
2227950742
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=202860
@ -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}
|
||||
|
39
databases/oracle8-client/files/patch-freebsd-oci8stub.c
Normal file
39
databases/oracle8-client/files/patch-freebsd-oci8stub.c
Normal file
@ -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);
|
||||
+}
|
@ -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
|
Loading…
Reference in New Issue
Block a user