summaryrefslogtreecommitdiffstats
path: root/mbbsd/talk.c
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-09-10 08:49:47 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-09-10 08:49:47 +0800
commit540cfa70e8e8b4db3cc2addccfcbeeb69fffa033 (patch)
tree6a4dec7d69249e48a6f79c4436eb634cb28744b2 /mbbsd/talk.c
parenta8a0ef3c4d10bf576054dc26348d9b4e6efeecc2 (diff)
downloadpttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.tar
pttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.tar.gz
pttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.tar.bz2
pttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.tar.lz
pttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.tar.xz
pttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.tar.zst
pttbbs-540cfa70e8e8b4db3cc2addccfcbeeb69fffa033.zip
merge back from branch victor.solaris
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2189 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/talk.c')
-rw-r--r--mbbsd/talk.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index eb51d4f4..5d69f85e 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -1259,7 +1259,11 @@ int make_connection_to_somebody(userinfo_t *uin, int timeout){
return -1;
}
length = sizeof(server);
+#if defined(Solaris) && __OS_MAJOR_VERSION__ == 5 && __OS_MINOR_VERSION__ < 7
+ if (getsockname(sock, (struct sockaddr *) & server, & length) < 0) {
+#else
if (getsockname(sock, (struct sockaddr *) & server, (socklen_t *) & length) < 0) {
+#endif
close(sock);
perror("sock name err");
unlockutmpmode();
@@ -1426,7 +1430,11 @@ my_talk(userinfo_t * uin, int fri_stat, char defact)
sock = make_connection_to_somebody(uin, 5);
+#if defined(Solaris) && __OS_MAJOR_VERSION__ == 5 && __OS_MINOR_VERSION__ < 7
+ msgsock = accept(sock, (struct sockaddr *) 0, 0);
+#else
msgsock = accept(sock, (struct sockaddr *) 0, (socklen_t *) 0);
+#endif
if (msgsock == -1) {
perror("accept");
unlockutmpmode();