Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Apr 2000 06:59:12 +0930 (CST)
From:      Greg Lewis <glewis@trc.adelaide.edu.au>
To:        freebsd-java@freebsd.org
Subject:   1.2.2 patches on 4.0 -- iomgr.c patch
Message-ID:  <200003312129.GAA20291@ares.trc.adelaide.edu.au>

next in thread | raw e-mail | index | archive | help

--ELM954538152-20277-0_
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Hi all,
  
A couple of people (thanks Edward and Dave!) have reported build problems
under 4.0 with the 1.2.2 patches.  The attached patch should hopefully
fix the problems but is untested at this time!

-- 
Greg Lewis 				glewis@trc.adelaide.edu.au
Computing Officer			+61 8 8303 5083
Teletraffic Research Centre

--ELM954538152-20277-0_
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: attachment; filename=iomgr.diff
Content-Description: iomgr.diff
Content-Transfer-Encoding: 7bit

--- iomgr.c~	Thu Mar 16 19:36:16 2000
+++ iomgr.c	Fri Mar 31 08:26:39 2000
@@ -1175,10 +1175,20 @@
     return nread;
 }
 
-#if defined(_OLDER_SOLARIS_SYS_SOCKET_H) || defined(__FreeBSD__)
+#if defined(_OLDER_SOLARIS_SYS_SOCKET_H) 
 ssize_t
 recvfrom(int fd, void *buf, size_t nbytes, int flags,
 	 struct sockaddr *from, int *fromlen)
+#elif defined(__FreeBSD__)
+#if __FreeBSD__ < 4
+ssize_t
+recvfrom(int fd, void *buf, size_t nbytes, int flags,
+	 struct sockaddr *from, int *fromlen)
+#else
+ssize_t
+recvfrom(int fd, void *buf, size_t nbytes, int flags,
+	 struct sockaddr *from, socklen_t *fromlen)
+#endif /* __FreeBSD__ */
 #else
 ssize_t
 recvfrom(int fd, void *buf, size_t nbytes, int flags,
@@ -1370,10 +1380,15 @@
 ssize_t sendto(int fd, const char *buf, int len,
 	       int flags, const struct sockaddr *to, int tolen) {
 #elif   defined(__FreeBSD__)
+#if __FreeBSD__ < 4
 ssize_t sendto(int fd, const void *buf, size_t len,
 	       int flags, const struct sockaddr *to, int tolen) {
 #else
 ssize_t sendto(int fd, const void *buf, size_t len,
+	       int flags, const struct sockaddr *to, socklen_t tolen) {
+#endif /* __FreeBSD__ */
+#else
+ssize_t sendto(int fd, const void *buf, size_t len,
 	       int flags, const struct sockaddr *to, size_t tolen) {
 #endif
     PRESERVE_ERRNO;
@@ -1447,9 +1462,17 @@
 /*
  * accept
  */
-#if defined(_OLDER_SOLARIS_SYS_SOCKET_H) || defined(__FreeBSD__)
+#if defined(_OLDER_SOLARIS_SYS_SOCKET_H) 
 int
 accept(int fd, struct sockaddr *him, int *len)
+#elif defined(__FreeBSD__)
+#if __FreeBSD__ < 4
+int
+accept(int fd, struct sockaddr *him, int *len)
+#else
+int
+accept(int fd, struct sockaddr *him, socklen_t *len)
+#endif /* __FreeBSD__ */
 #else
 int
 accept(int fd, struct sockaddr *him, void *len)
@@ -2184,8 +2207,13 @@
 int 
 connect(int fd, struct sockaddr *him, int len) {
 #elif defined(__FreeBSD__)
+#if __FreeBSD__ < 4
 int
 connect(int fd, const struct sockaddr *him, int len) {
+#else
+int
+connect(int fd, const struct sockaddr *him, socklen_t len) {
+#endif /* __FreeBSD__ */
 #else
 int
 connect(int fd, const struct sockaddr *him, size_t len) {

--ELM954538152-20277-0_--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003312129.GAA20291>