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
[-- Attachment #1 --]
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
[-- Attachment #2 --]
--- 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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003312129.GAA20291>
