Overview
Comment: | Make SCTP work on Solaris |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
a65e33b00a35b9562c2a64af8d8a0c69 |
User & Date: | js on 2024-10-26 11:29:26 |
Other Links: | manifest | tags |
Context
2024-10-27
| ||
11:38 | OFPlugin: Allow path to be nil check-in: 5aba968988 user: js tags: trunk | |
2024-10-26
| ||
11:29 | Make SCTP work on Solaris check-in: a65e33b00a user: js tags: trunk | |
2024-10-25
| ||
22:38 | OFSCTPSocket: Don't require -lsctp check-in: abe832b03d user: js tags: trunk | |
Changes
Modified configure.ac from [7abd4315da] to [9067714a39].
︙ | |||
1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 | 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 | + + + + | [Whether we have netinet/tcp.h]) ]) AC_CHECK_HEADER(netinet/sctp.h, [ AC_DEFINE(OF_HAVE_SCTP, 1, [Whether we have SCTP]) AC_DEFINE(OF_HAVE_NETINET_SCTP_H, 1, [Whether we have netinet/sctp.h]) AC_SUBST(USE_SRCS_SCTP, '${SRCS_SCTP}') ], [], [ #ifdef OF_HAVE_SYS_SOCKET_H # include <sys/socket.h> #endif ]) AC_CHECK_HEADERS([arpa/inet.h netdb.h sys/sockio.h]) AC_CHECK_HEADERS([net/if.h], [], [], [ #ifdef OF_HAVE_SYS_SOCKET_H # include <sys/socket.h> #endif ]) |
︙ |
Modified src/OFSCTPSocket.m from [c5135980c9] to [90795d2a22].
︙ | |||
14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | + + | * * You should have received a copy of the GNU Lesser General Public License * version 3.0 along with this program. If not, see * <https://www.gnu.org/licenses/>. */ #include "config.h" #define _XPG4_2 #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #ifdef HAVE_FCNTL_H |
︙ | |||
47 48 49 50 51 52 53 54 55 56 57 58 59 60 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | + + + + | #import "OFBindIPSocketFailedException.h" #import "OFGetOptionFailedException.h" #import "OFNotOpenException.h" #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" #import "OFSetOptionFailedException.h" #import "OFWriteFailedException.h" #ifdef OF_SOLARIS # define SCTP_UNORDERED MSG_UNORDERED #endif const OFSCTPMessageInfoKey OFSCTPStreamID = @"OFSCTPStreamID"; const OFSCTPMessageInfoKey OFSCTPPPID = @"OFSCTPPPID"; const OFSCTPMessageInfoKey OFSCTPUnordered = @"OFSCTPUnordered"; static const OFRunLoopMode connectRunLoopMode = @"OFSCTPSocketConnectRunLoopMode"; |
︙ | |||
90 91 92 93 94 95 96 97 98 99 | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | + + + - - - - - - + + - | @implementation OFSCTPSocket @dynamic delegate; - (bool)of_createSocketForAddress: (const OFSocketAddress *)address errNo: (int *)errNo { const struct sctp_event_subscribe events = { .sctp_data_io_event = 1 }; #if SOCK_CLOEXEC == 0 && defined(HAVE_FCNTL) && defined(FD_CLOEXEC) int flags; #endif |
︙ | |||
329 330 331 332 333 334 335 | 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | - + + + - - - + + - - + | } objc_autoreleasePoolPop(pool); return address; } |
︙ | |||
387 388 389 390 391 392 393 | 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 | - - - + + + - + - + - + | *info = nil; for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; cmsg = CMSG_NXTHDR(&msg, cmsg)) { if (cmsg->cmsg_level != IPPROTO_SCTP) continue; |
︙ | |||
471 472 473 474 475 476 477 | 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 | - - + + - - - + + + - + - - - + + + | info: (OFSCTPMessageInfo)info { ssize_t bytesWritten; struct iovec iov = { .iov_base = (void *)buffer, .iov_len = length }; |
︙ |