mirror of OpenBSD xenocara tree github.com/openbsd/xenocara
openbsd
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update to xtrans 1.6.0. ok tb@ jsg@

+770 -215
+1 -1
lib/libxtrans/COPYING
··· 48 48 49 49 ______________________________________________________________________________ 50 50 51 - Copyright (c) 2002, 2005, Oracle and/or its affiliates. 51 + Copyright (c) 2002, 2025, Oracle and/or its affiliates. 52 52 53 53 Permission is hereby granted, free of charge, to any person obtaining a 54 54 copy of this software and associated documentation files (the "Software"),
+519 -15
lib/libxtrans/ChangeLog
··· 1 + commit cf05ba4a10c90da2c63805a5375e983b174e28b0 2 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 3 + Date: Sat Mar 8 16:07:43 2025 -0800 4 + 5 + xtrans 1.6.0 6 + 7 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 8 + 9 + commit c8c291390f4befb7d813d7fce6caeb6607561903 10 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 11 + Date: Mon Jan 20 09:54:21 2025 -0800 12 + 13 + is_numeric: Add defined(X11_t) to checks 14 + 15 + Fixes builds of XTS which still builds X11 client side code (unlike 16 + libX11 which relies on xcb instead of xtrans now for X11 connections). 17 + 18 + Fixes: 0f15306 ("is_numeric: Add TRANS_SERVER to required ifdefs") 19 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 20 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/28> 21 + 22 + commit 633ac2f03369eb93b70958c783722cfe3e93aacc 23 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 24 + Date: Sat Jan 18 12:00:41 2025 -0800 25 + 26 + Convert one more IPv6 ifdef to HAVE_GETADDRINFO 27 + 28 + If getaddrinfo returned multiple addresses, try another when first fails, 29 + even if we're only using IPv4. 30 + 31 + Fixes: 0241531 ("if getaddrinfo() is available, use it, even if IPv6 support is disabled") 32 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 33 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/28> 34 + 35 + commit 2c4a122ca0512936d4306ef449f6b7b2566d6785 36 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 37 + Date: Sat Jan 18 11:50:59 2025 -0800 38 + 39 + if sockaddr_storage is available, use it, even if IPv6 support is disabled 40 + 41 + Support for using sockaddr_storage was originally added to support IPv6, 42 + and only used if IPv6 support was enabled. Two decades later, support 43 + for sockaddr_storage is ubiquitous and can simplify our code paths, 44 + so use the modern interface whenever we can now. 45 + 46 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 47 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/28> 48 + 49 + commit deb755c0ad4575a7542e2abcba986a003fddb198 50 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 51 + Date: Sat Jan 18 11:07:30 2025 -0800 52 + 53 + if inet_ntop() is available, use it, even if IPv6 support is disabled 54 + 55 + Support for using inet_ntop() was originally added to support IPv6, 56 + and only used if IPv6 support was enabled. Two decades later, support 57 + for inet_ntop() is ubiquitous and OS'es have marked inet_ntoa() 58 + as deprecated, so use the modern interface whenever we can now. 59 + 60 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 61 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/28> 62 + 63 + commit 02415310dd4997b4a7943814381c0b52d91eb8de 64 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 65 + Date: Sat Jan 11 13:06:06 2025 -0800 66 + 67 + if getaddrinfo() is available, use it, even if IPv6 support is disabled 68 + 69 + Support for using getaddrinfo() was originally added to support IPv6, 70 + and only used if IPv6 support was enabled. Two decades later, support 71 + for getaddrinfo() is ubiquitous and OS'es have marked gethostbyname() 72 + as deprecated, so use the modern interface whenever we can now. 73 + 74 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 75 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/27> 76 + 77 + commit 7aa12b634fadf2c414080f1ba3d373430cf2d8f2 78 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 79 + Date: Sat Jan 11 12:24:03 2025 -0800 80 + 81 + Simplify ifdefs for IPv6 support 82 + 83 + Instead of checking for AF_INET6 at every ifdef, just check once per file 84 + and report that IPv6 support is not available, instead of silently not 85 + building support for it that configure said we were going to build. 86 + 87 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 88 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/27> 89 + 90 + commit e58ae2d27f7baee28319faa02b77cdc344e2f0ca 91 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 92 + Date: Sat Nov 16 16:37:06 2024 -0800 93 + 94 + SocketOpenCOTSServer: handle -Wconditional-uninitialized warning 95 + 96 + Clears warning from clang 13: 97 + 98 + .../include/X11/Xtrans/Xtranssock.c:670:14: warning: variable 'ciptr' 99 + may be uninitialized when used here [-Wconditional-uninitialized] 100 + setsockopt (ciptr->fd, SOL_SOCKET, SO_REUSEADDR, 101 + ^~~~~ 102 + .../include/X11/Xtrans/Xtranssock.c:624:25: note: initialize the 103 + variable 'ciptr' to silence this warning 104 + XtransConnInfo ciptr; 105 + ^ 106 + = NULL 107 + 108 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 109 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/26> 110 + 111 + commit 3fc4f55eb36c02fab3a5b04610d91c481d6a5aec 112 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 113 + Date: Sat Nov 16 15:08:20 2024 -0800 114 + 115 + SocketOpenCOTSClientBase: handle -Wconditional-uninitialized warning 116 + 117 + Clears warning from clang 13: 118 + 119 + .../include/X11/Xtrans/Xtranssock.c:602:12: warning: variable 'ciptr' 120 + may be uninitialized when used here [-Wconditional-uninitialized] 121 + return ciptr; 122 + ^~~~~ 123 + .../include/X11/Xtrans/Xtranssock.c:575:25: note: initialize the 124 + variable 'ciptr' to silence this warning 125 + XtransConnInfo ciptr; 126 + ^ 127 + = NULL 128 + 129 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 130 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/26> 131 + 132 + commit dc71da9eb353f2e41af96923f292c621aeddd37f 133 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 134 + Date: Sat Nov 16 14:46:29 2024 -0800 135 + 136 + Clear -Wmissing-variable-declarations from clang 13 137 + 138 + Silences 7 warnings of the form: 139 + 140 + .../include/X11/Xtrans/Xtranslcl.c:1347:12: warning: no previous extern 141 + declaration for non-static variable '_FSTransLocalFuncs' 142 + [-Wmissing-variable-declarations] 143 + Xtransport TRANS(LocalFuncs) = { 144 + ^ 145 + .../include/X11/Xtrans/Xtranslcl.c:1347:1: note: declare 'static' if the 146 + variable is not intended to be used outside of this translation unit 147 + 148 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 149 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/26> 150 + 151 + commit 1dda77bb6ac9f473513a80e8ce5b32c4bde3448a 152 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 153 + Date: Sat Nov 16 14:23:25 2024 -0800 154 + 155 + Quiet -Wformat-pedantic warnings from clang 13 for non-void-* args to %p 156 + 157 + Clears 23 warnings of the form: 158 + .../include/X11/Xtrans/Xtrans.c:129:36: warning: format specifies type 159 + 'void *' but the argument has type 'XtransConnInfo' 160 + (aka 'struct _XtransConnInfo *') [-Wformat-pedantic] 161 + prmsg (3,"FreeConnInfo(%p)\n", ciptr); 162 + ~~ ^~~~~ 163 + 164 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 165 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/26> 166 + 167 + commit e69d45306f38367ce3a0a5fa126beeb4e6370585 168 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 169 + Date: Sat Nov 9 09:17:22 2024 -0800 170 + 171 + accept const pointers for buf argument to TRANS(Write) 172 + 173 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 174 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/25> 175 + 176 + commit 0dc46e7ed5bdd876467f9dbb314ba6b8094e541b 177 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 178 + Date: Sat Nov 9 09:04:34 2024 -0800 179 + 180 + xtrans 1.5.2 181 + 182 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 183 + 184 + commit d312424a6f2d5bff18f150dfecfc632b334fb878 185 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 186 + Date: Tue Oct 22 14:44:46 2024 -0700 187 + 188 + is_numeric: Add !defined(IPv6) to checks 189 + 190 + Fixes builds without IPv6 support, since old IPv4 code uses is_numeric() 191 + 192 + Closes: #6 193 + Fixes: 0f15306 ("is_numeric: Add TRANS_SERVER to required ifdefs") 194 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 195 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/23> 196 + 197 + commit ae99ac32f61e0db92a45179579030a23fe1b5770 198 + Author: Peter Harris <pharris2@rocketsoftware.com> 199 + Date: Tue Oct 15 09:51:33 2024 -0400 200 + 201 + Fix build when HAVE_STRCASECMP is not defined 202 + 203 + Regression introduced in commit 4792e9e798de327572aba1575438b6936a55c7ef 204 + "Clear numerous -Wsign-compare warnings from gcc 14.1". 205 + 206 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/22> 207 + 208 + commit df6ae7c7e0b6241a05ad2814bced637b00b1a83f 209 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 210 + Date: Sat Oct 12 13:39:19 2024 -0700 211 + 212 + xtrans 1.5.1 213 + 214 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 215 + 216 + commit 0f153064bfa4bb69e86f3f2383f2f421f2360319 217 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 218 + Date: Sat Aug 24 18:19:45 2024 -0700 219 + 220 + is_numeric: Add TRANS_SERVER to required ifdefs 221 + 222 + Avoids -Wunused-function warnings when only building for TRANS_CLIENT 223 + code, such as libFS. 224 + 225 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 226 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20> 227 + 228 + commit 957adac35fb77d5a72f676d697f32ce94ab7392f 229 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 230 + Date: Sat Aug 24 18:12:16 2024 -0700 231 + 232 + SocketOpen: avoid leak of out-of-range fd 233 + 234 + Clears gcc 14.1 warning: 235 + 236 + /usr/include/X11/Xtrans/Xtranssock.c: In function ‘_FSTransSocketOpen’: 237 + /usr/include/X11/Xtrans/Xtranssock.c:425:9: warning: leak of file descriptor 238 + [CWE-775] [-Wanalyzer-fd-leak] 239 + 425 | free (ciptr); 240 + | ^~~~~~~~~~~~ 241 + [...] 242 + | 415 | || ciptr->fd >= sysconf(_SC_OPEN_MAX) 243 + | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 244 + | | | | 245 + | | | (62) ...to here 246 + | | (63) following ‘true’ branch... 247 + [...] 248 + 249 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 250 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20> 251 + 252 + commit bea5a32105aebdc99f84f9ee4b70de7a116eb1d7 253 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 254 + Date: Sat Aug 24 17:49:58 2024 -0700 255 + 256 + GetPeerNetworkId: avoid calling strlen() on a NULL pointer 257 + 258 + Various failure states may leave addr set to NULL instead of a string. 259 + 260 + Clears warnings from gcc 14.1: 261 + 262 + /usr/include/X11/Xtrans/Xtransutil.c: In function ‘_IceTransGetPeerNetworkId’: 263 + /usr/include/X11/Xtrans/Xtransutil.c:402:62: warning: use of NULL ‘addr’ 264 + where non-null expected [CWE-476] [-Wanalyzer-null-argument] 265 + 402 | hostname = malloc (strlen (ciptr->transptr->TransName) + strlen (addr) + 2); 266 + | ^~~~~~~~~~~~ 267 + <built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null 268 + 269 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 270 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20> 271 + 272 + commit e5390ab716fb470ac4b5fd7a4133eabbfaac994e 273 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 274 + Date: Sat Aug 24 17:44:41 2024 -0700 275 + 276 + GetPeerNetworkId: Avoid writing to NULL pointer if malloc() fails 277 + 278 + Clears gcc 14.1 warning: 279 + 280 + /usr/include/X11/Xtrans/Xtransutil.c:403:5: warning: use of possibly-NULL 281 + ‘hostname’ where non-null expected [CWE-690] 282 + [-Wanalyzer-possible-null-argument] 283 + 403 | strcpy (hostname, ciptr->transptr->TransName); 284 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 285 + <built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null 286 + 287 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 288 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20> 289 + 290 + commit 215e8db07d05d425714b05b8a439c73735f9d04f 291 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 292 + Date: Sat Aug 24 17:40:10 2024 -0700 293 + 294 + GetMyNetworkId: Avoid writing to NULL pointer if malloc() fails 295 + 296 + Clears warnings from gcc 14.1: 297 + 298 + In file included from /usr/include/X11/Xtrans/transport.c:70: 299 + /usr/include/X11/Xtrans/Xtransutil.c: In function ‘_IceTransGetMyNetworkId’: 300 + /usr/include/X11/Xtrans/Xtransutil.c:253:9: warning: use of possibly-NULL 301 + ‘networkId’ where non-null expected [CWE-690] 302 + [-Wanalyzer-possible-null-argument] 303 + 253 | sprintf (networkId, "%s/%s:%s", transName, 304 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 305 + 254 | hostnamebuf, saddr->sun_path); 306 + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 307 + <built-in>: note: argument 1 of ‘__builtin_sprintf’ must be non-null 308 + 309 + /usr/include/X11/Xtrans/Xtransutil.c:283:9: warning: use of possibly-NULL 310 + ‘networkId’ where non-null expected [CWE-690] 311 + [-Wanalyzer-possible-null-argument] 312 + 283 | sprintf (networkId, "%s/%s:%s", transName, hostnamebuf, portnumbuf); 313 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 314 + <built-in>: note: argument 1 of ‘__builtin_sprintf’ must be non-null 315 + 316 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 317 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20> 318 + 319 + commit 376744aa60ff8df0ddbcf090f0177c15706df71e 320 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 321 + Date: Sat Aug 24 17:33:13 2024 -0700 322 + 323 + MakeAllCOTSServerListeners: Initialize temp_ciptrs 324 + 325 + I don't think this is strictly necessary, but it shouldn't hurt and 326 + makes gcc 14.1 stop warning about: 327 + 328 + /usr/include/X11/Xtrans/Xtrans.c: In function 329 + ‘_IceTransMakeAllCOTSServerListeners’: 330 + /usr/include/X11/Xtrans/Xtrans.h:108:21: warning: use of uninitialized 331 + value ‘temp_ciptrs[j]’ [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 332 + 108 | #define TRANS(func) _IceTrans##func 333 + /usr/include/X11/Xtrans/Xtrans.c:1203:21: note: in expansion of macro ‘TRANS’ 334 + 1203 | TRANS(Close) (temp_ciptrs[j]); 335 + | ^~~~~ 336 + 337 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 338 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20> 339 + 340 + commit 742462a572e524ae82a8c18106c03820da322102 341 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 342 + Date: Sat Aug 24 17:23:10 2024 -0700 343 + 344 + ParseAddress: return failure when strdup() fails 345 + 346 + Clears warning from gcc 14.1: 347 + In file included from /usr/include/X11/Xtrans/transport.c:69: 348 + /usr/include/X11/Xtrans/Xtrans.c: In function ‘_IceTransParseAddress’: 349 + /usr/include/X11/Xtrans/Xtrans.c:246:19: warning: use of possibly-NULL ‘mybuf’ 350 + where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument] 351 + 246 | if ( ((mybuf = strchr (mybuf,'/')) == NULL) && 352 + | ^~~~~~~~~~~~~~~~~~ 353 + 354 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 355 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20> 356 + 357 + commit e9ead32308c588e5c12dbfb6a6452e0f2c88bafd 358 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 359 + Date: Sat Aug 24 17:18:01 2024 -0700 360 + 361 + SocketINETConnect: return failure when malloc() fails 362 + 363 + Clears warning from gcc 14.1: 364 + In file included from /usr/include/X11/Xtrans/transport.c:67: 365 + /usr/include/X11/Xtrans/Xtranssock.c: In function ‘_IceTransSocketINETConnect’: 366 + /usr/include/X11/Xtrans/Xtranssock.c:1385:33: warning: dereference of 367 + possibly-NULL ‘addrlist’ [CWE-690] [-Wanalyzer-possible-null-dereference] 368 + 1385 | addrlist->firstaddr = NULL; 369 + | ^ 370 + 371 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 372 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20> 373 + 374 + commit 4792e9e798de327572aba1575438b6936a55c7ef 375 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 376 + Date: Sat Aug 24 17:11:28 2024 -0700 377 + 378 + Clear numerous -Wsign-compare warnings from gcc 14.1 379 + 380 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 381 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20> 382 + 383 + commit 9ad6c6764f0517f91492c04ae03a59f53229ef69 384 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 385 + Date: Sat Aug 24 16:52:05 2024 -0700 386 + 387 + SocketCreateListener: Fix -Wuseless-cast warning in bind() call 388 + 389 + sockname is defined as struct sockaddr * in the arguments to 390 + SocketCreateListener so we don't need to cast to that when calling bind() 391 + 392 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 393 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20> 394 + 395 + commit 9ed4f5ec909cf262a2404012768858792f976e36 396 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 397 + Date: Sat Aug 24 16:51:17 2024 -0700 398 + 399 + LocalInitTransports: Fix -Wuseless-cast warning for getenv() call 400 + 401 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 402 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/20> 403 + 404 + commit edd3f51328df9c621277168c9dd77b1e80ccfd7c 405 + Author: Robert Royals <robert.royals@protonmail.com> 406 + Date: Sun Jul 21 22:54:27 2024 +0100 407 + 408 + Fix string length check 409 + 410 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/19> 411 + 412 + commit 656d27ed32af4082e8062c1d7c42b65ea3a6b80f 413 + Author: Kim Woelders <kim@woelders.dk> 414 + Date: Thu Mar 28 18:01:20 2024 +0100 415 + 416 + TRANS(GetHostname): Fix "‘strncpy’ output truncated.." warning 417 + 418 + Occurs when compiling xserver master with gcc 13.2.1. 419 + 420 + In file included from /local/stuff/xorg/include/X11/Xtrans/transport.c:69: 421 + In function ‘_XSERVTransGetHostname’, 422 + inlined from ‘_XSERVTransConvertAddress’ at /local/stuff/xorg/include/X11/Xtrans/Xtransutil.c:188:12: 423 + /local/stuff/xorg/include/X11/Xtrans/Xtrans.c:1352:5: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] 424 + 1352 | strncpy (buf, name.nodename, len); 425 + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 426 + /local/stuff/xorg/include/X11/Xtrans/Xtrans.c:1350:11: note: length computed here 427 + 1350 | len = strlen (name.nodename); 428 + | ^~~~~~~~~~~~~~~~~~~~~~ 429 + 430 + Signed-off-by: Kim Woelders <kim@woelders.dk> 431 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/16> 432 + 433 + commit 6171150fe9f8edad3f1cfb14cec59e6a42a9c15b 434 + Author: Kim Woelders <kim@woelders.dk> 435 + Date: Thu Mar 28 17:29:26 2024 +0100 436 + 437 + TRANS(ParseAddress): Fix "assignment discards ‘const’ qualifier" warnings 438 + 439 + Occurs when compiling xserver master with gcc 13.2.1. 440 + 441 + In file included from /local/stuff/xorg/include/X11/Xtrans/transport.c:69, 442 + from ../os/xstrans.c:17: 443 + /local/stuff/xorg/include/X11/Xtrans/Xtrans.c: In function ‘_XSERVTransParseAddress’: 444 + /local/stuff/xorg/include/X11/Xtrans/Xtrans.c:216:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 445 + 216 | _host = ""; 446 + | ^ 447 + /local/stuff/xorg/include/X11/Xtrans/Xtrans.c:217:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 448 + 217 | _port = address; 449 + | ^ 450 + /local/stuff/xorg/include/X11/Xtrans/Xtrans.c:229:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 451 + 229 | _host = ""; 452 + | ^ 453 + /local/stuff/xorg/include/X11/Xtrans/Xtrans.c:230:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 454 + 230 | _port = address + 5; 455 + | ^ 456 + 457 + Signed-off-by: Kim Woelders <kim@woelders.dk> 458 + Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/merge_requests/16> 459 + 460 + commit c219be946b1d8a641dcbc7a60904293f105e2866 461 + Author: Enrico Weigelt, metux IT consult <info@metux.net> 462 + Date: Wed Apr 3 12:11:48 2024 +0200 463 + 464 + update .gitignore 465 + 466 + Add some yet missing auto-generated files. 467 + 468 + Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> 469 + 470 + commit 806f04c6e4529358f160e53135baf105e4ecf3b8 471 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 472 + Date: Fri Oct 13 13:37:49 2023 -0700 473 + 474 + gitlab CI: add libc-dev to required packages in build container 475 + 476 + Resolves configure failure: 477 + configure:3823: checking whether the C compiler works 478 + configure:3845: gcc conftest.c >&5 479 + /usr/bin/ld: cannot find Scrt1.o: No such file or directory 480 + /usr/bin/ld: cannot find crti.o: No such file or directory 481 + collect2: error: ld returned 1 exit status 482 + configure:3849: $? = 1 483 + configure:3889: result: no 484 + 485 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 486 + 487 + commit 3aa3c318ded5da802e181f0d29b94ab6a692e387 488 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 489 + Date: Fri Oct 13 13:32:15 2023 -0700 490 + 491 + gitlab CI: collect config.log to help diagnose failures 492 + 493 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 494 + 495 + commit 6d5a4512b5ee4757a474df3f5e938784da963de1 496 + Author: Alan Coopersmith <alan.coopersmith@oracle.com> 497 + Date: Fri Oct 13 13:26:49 2023 -0700 498 + 499 + gitlab CI: add xz-utils to container for "make distcheck" 500 + 501 + Also update to latest ci-templates 502 + 503 + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> 504 + 1 505 commit 3b3a3bd75d86aec78f6ef893b198c3efc378bc64 2 506 Author: Alan Coopersmith <alan.coopersmith@oracle.com> 3 507 Date: Fri Jun 2 17:29:41 2023 -0700 ··· 598 1102 Signed-off-by: Hans de Goede <hdegoede@redhat.com> 599 1103 600 1104 commit e1e6121a1638d43d9929589b4723da2b38cb6b44 601 - Author: Łukasz Stelmach <l.stelmach@samsung.com> 1105 + Author: Łukasz Stelmach <l.stelmach@samsung.com> 602 1106 Date: Mon Nov 25 11:11:54 2013 +0100 603 1107 604 1108 Enable systemd socket activation ··· 619 1123 Acked-by: Peter Hutterer <peter.hutterer@who-t.net> 620 1124 621 1125 commit b895d45e225dd3d1bf9d598774d3ae4f29fcbc25 622 - Author: Łukasz Stelmach <l.stelmach@samsung.com> 1126 + Author: Łukasz Stelmach <l.stelmach@samsung.com> 623 1127 Date: Thu Nov 28 12:57:21 2013 +0100 624 1128 625 1129 Define TRANS_RECEIVED flag for transports ··· 834 1338 Signed-off-by: Keith Packard <keithp@keithp.com> 835 1339 836 1340 commit f6a161f2a003f4da0a2e414b4faa0ee0de0c01f0 837 - Author: Łukasz Stelmach <l.stelmach@samsung.com> 1341 + Author: Łukasz Stelmach <l.stelmach@samsung.com> 838 1342 Date: Tue Jul 9 16:24:43 2013 +0200 839 1343 840 1344 Add const qualifier to unix_nolisten ··· 1518 2022 Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> 1519 2023 1520 2024 commit dab2bcdaf60977643ec55d71a81e67c1e3a162a9 1521 - Author: Rémi Cardona <remi@gentoo.org> 2025 + Author: Rémi Cardona <remi@gentoo.org> 1522 2026 Date: Thu Dec 17 08:31:20 2009 +0100 1523 2027 1524 2028 require autoconf 2.60 because of $(docdir) use ··· 1976 2480 <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6688467> 1977 2481 1978 2482 commit 556a351de83fc6f401b02213dae95731553c216d 1979 - Author: Loïc Minier <lool@dooz.org> 2483 + Author: Loïc Minier <lool@dooz.org> 1980 2484 Date: Mon Mar 24 15:38:27 2008 -0400 1981 2485 1982 2486 Bug #10489: Don't retry unix socket connect()s on ENOENT. ··· 2393 2897 Make includedir=@includedir@ in xtrans.pc.in, not with /X11/Xtrans. 2394 2898 2395 2899 commit b413f4c1dddc467014adf16bfe31627e65508c12 2396 - Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> 2900 + Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> 2397 2901 Date: Wed Jun 22 22:46:39 2005 +0000 2398 2902 2399 2903 Apply these patches from Theo van Klaveren: ··· 2409 2913 platforms that don't define it in the system headers. 2410 2914 2411 2915 commit f5a6a188407cec6e567070d192aac2db72cacd92 2412 - Author: Kristian Høgsberg <krh@redhat.com> 2916 + Author: Kristian Høgsberg <krh@redhat.com> 2413 2917 Date: Wed Jun 22 01:21:24 2005 +0000 2414 2918 2415 2919 Apply patch by Alan Coopersmith from #1605 to fix address resolution of ··· 2437 2941 prefix's aclocal dir is not in a default path for system aclocal. 2438 2942 2439 2943 commit 58c7263ca5b64a21dc101bb4b24201ba67a8d068 2440 - Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> 2944 + Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> 2441 2945 Date: Wed May 25 21:47:56 2005 +0000 2442 2946 2443 2947 - Add FSlib to symlink.sh ··· 2484 2988 Require automake 1.7 in AM_INIT_AUTOMAKE 2485 2989 2486 2990 commit daa7168e9e0cdff5eb06b0c9a7155f8880681fff 2487 - Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> 2991 + Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> 2488 2992 Date: Fri May 13 22:53:43 2005 +0000 2489 2993 2490 2994 - For now put xtrans in X11/Xtrans/X11, since libX11 is looking for it in ··· 2498 3002 - Conditionally include config.h in Xlib source 2499 3003 2500 3004 commit d11d95fa4faec21655625b7de27d8a71c08ffe2d 2501 - Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> 3005 + Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> 2502 3006 Date: Fri May 13 15:16:43 2005 +0000 2503 3007 2504 3008 Dummy changes to ChangeLog/configure.ac to see if that fixes group 2505 3009 permissions 2506 3010 2507 3011 commit b8a8c31f63a543d1c1c6bb4ae26a4019b4400edc 2508 - Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> 3012 + Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> 2509 3013 Date: Fri May 13 15:04:52 2005 +0000 2510 3014 2511 3015 Re-adding ChangeLog and configure.ac files 2512 3016 2513 3017 commit 798c08054ce5a8238f35fee3e69218ece74441fa 2514 - Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> 3018 + Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> 2515 3019 Date: Fri May 13 15:02:19 2005 +0000 2516 3020 2517 3021 Temporarily remove ChangeLog configure.ac 2518 3022 2519 3023 commit b3da86ae588df14dde916674a4f6593edf1964f7 2520 - Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> 3024 + Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> 2521 3025 Date: Fri May 13 14:43:37 2005 +0000 2522 3026 2523 3027 Dummy commit to see if that fixes the group execute permissions 2524 3028 2525 3029 commit ea04267da780c2c3f08a710d15468565897420c4 2526 - Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> 3030 + Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> 2527 3031 Date: Thu May 12 16:12:34 2005 +0000 2528 3032 2529 3033 Make xtrans install in $(includedir)/X11/Xtrans. Remove all references to ··· 2538 3042 Add Xtransdef.h.in as an AM_CONFIG_HEADER. 2539 3043 2540 3044 commit d628bf24f2bf0d017394b6961784d7ac5b33f46b 2541 - Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> 3045 + Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> 2542 3046 Date: Wed May 11 22:44:52 2005 +0000 2543 3047 2544 3048 lib/Xau:
+39 -34
lib/libxtrans/Xtrans.c
··· 82 82 #define TRANS_SOCKET_INET6_INDEX 14 83 83 #define TRANS_LOCAL_PIPE_INDEX 15 84 84 85 + #if defined(IPv6) && !defined(AF_INET6) 86 + #error "Cannot build IPv6 support without AF_INET6" 87 + #endif 85 88 86 89 static 87 90 Xtransport_table Xtransports[] = { 88 91 #if defined(TCPCONN) 89 92 { &TRANS(SocketTCPFuncs), TRANS_SOCKET_TCP_INDEX }, 90 - #if defined(IPv6) && defined(AF_INET6) 93 + #if defined(IPv6) 91 94 { &TRANS(SocketINET6Funcs), TRANS_SOCKET_INET6_INDEX }, 92 95 #endif /* IPv6 */ 93 96 { &TRANS(SocketINETFuncs), TRANS_SOCKET_INET_INDEX }, ··· 126 129 TRANS(FreeConnInfo) (XtransConnInfo ciptr) 127 130 128 131 { 129 - prmsg (3,"FreeConnInfo(%p)\n", ciptr); 132 + prmsg (3,"FreeConnInfo(%p)\n", (void *) ciptr); 130 133 131 134 if (ciptr->addr) 132 135 free (ciptr->addr); ··· 150 153 #ifndef HAVE_STRCASECMP 151 154 char protobuf[PROTOBUFSIZE]; 152 155 #endif 153 - int i; 154 156 155 157 prmsg (3,"SelectTransport(%s)\n", protocol); 156 158 ··· 163 165 strncpy (protobuf, protocol, PROTOBUFSIZE - 1); 164 166 protobuf[PROTOBUFSIZE-1] = '\0'; 165 167 166 - for (i = 0; i < PROTOBUFSIZE && protobuf[i] != '\0'; i++) 168 + for (unsigned int i = 0; i < PROTOBUFSIZE && protobuf[i] != '\0'; i++) 167 169 if (isupper ((unsigned char)protobuf[i])) 168 170 protobuf[i] = tolower ((unsigned char)protobuf[i]); 169 171 #endif 170 172 171 173 /* Look at all of the configured protocols */ 172 174 173 - for (i = 0; i < NUMTRANS; i++) 175 + for (unsigned int i = 0; i < NUMTRANS; i++) 174 176 { 175 177 #ifndef HAVE_STRCASECMP 176 178 if (!strcmp (protobuf, Xtransports[i].transport->TransName)) ··· 204 206 205 207 char *mybuf, *tmpptr = NULL; 206 208 const char *_protocol = NULL; 207 - char *_host, *_port; 209 + const char *_host, *_port; 208 210 char hostnamebuf[256]; 211 + char *_host_buf; 209 212 int _host_len; 210 213 211 214 prmsg (3,"ParseAddress(%s)\n", address); ··· 243 246 _protocol = mybuf; 244 247 245 248 246 - if ( ((mybuf = strchr (mybuf,'/')) == NULL) && 247 - ((mybuf = strrchr (tmpptr,':')) == NULL) ) 248 - { 249 + if ((mybuf == NULL) || 250 + ( ((mybuf = strchr (mybuf, '/')) == NULL) && 251 + ((mybuf = strrchr (tmpptr, ':')) == NULL) ) ) 252 + { 249 253 /* address is in a bad format */ 250 254 *protocol = NULL; 251 255 *host = NULL; ··· 293 297 294 298 /* Get the host part */ 295 299 296 - _host = mybuf; 300 + _host = _host_buf = mybuf; 297 301 298 302 if ((mybuf = strrchr (mybuf,':')) == NULL) 299 303 { ··· 312 316 TRANS(GetHostname) (hostnamebuf, sizeof (hostnamebuf)); 313 317 _host = hostnamebuf; 314 318 } 315 - #if defined(IPv6) && defined(AF_INET6) 319 + #ifdef IPv6 316 320 /* hostname in IPv6 [numeric_addr]:0 form? */ 317 321 else if ( (_host_len > 3) && 318 322 ((strcmp(_protocol, "tcp") == 0) || (strcmp(_protocol, "inet6") == 0)) 319 - && (*_host == '[') && (*(_host + _host_len - 1) == ']') ) { 323 + && (_host_buf[0] == '[') && (_host_buf[_host_len - 1] == ']') ) { 320 324 struct sockaddr_in6 sin6; 321 325 322 - *(_host + _host_len - 1) = '\0'; 326 + _host_buf[_host_len - 1] = '\0'; 323 327 324 328 /* Verify address is valid IPv6 numeric form */ 325 329 if (inet_pton(AF_INET6, _host + 1, &sin6) == 1) { ··· 328 332 _protocol = "inet6"; 329 333 } else { 330 334 /* It's not, restore it just in case some other code can use it. */ 331 - *(_host + _host_len - 1) = ']'; 335 + _host_buf[_host_len - 1] = ']'; 332 336 } 333 337 } 334 338 #endif ··· 499 503 XtransConnInfo ciptr = NULL; 500 504 Xtransport *thistrans = NULL; 501 505 char *save_port; 502 - int i; 503 506 504 507 prmsg (2,"Reopen(%d,%d,%s)\n", trans_id, fd, port); 505 508 506 509 /* Determine the transport type */ 507 510 508 - for (i = 0; i < NUMTRANS; i++) 511 + for (unsigned int i = 0; i < NUMTRANS; i++) 512 + { 509 513 if (Xtransports[i].transport_id == trans_id) 510 514 { 511 515 thistrans = Xtransports[i].transport; 512 516 break; 513 517 } 518 + } 514 519 515 520 if (thistrans == NULL) 516 521 { ··· 602 607 int *trans_id, int *fd, char **port) 603 608 604 609 { 605 - int i; 606 - 607 - for (i = 0; i < NUMTRANS; i++) 610 + for (unsigned int i = 0; i < NUMTRANS; i++) 611 + { 608 612 if (Xtransports[i].transport == ciptr->transptr) 609 613 { 610 614 *trans_id = Xtransports[i].transport_id; ··· 615 619 else 616 620 return 1; 617 621 } 622 + } 618 623 619 624 return 0; 620 625 } ··· 899 904 } 900 905 901 906 int 902 - TRANS(Write) (XtransConnInfo ciptr, char *buf, int size) 907 + TRANS(Write) (XtransConnInfo ciptr, const char *buf, int size) 903 908 904 909 { 905 910 return ciptr->transptr->Write (ciptr, buf, size); ··· 1020 1025 { 1021 1026 int count = 0; 1022 1027 int found_local = 0; 1023 - int i; 1024 1028 1025 1029 /* 1026 1030 * For a complete network, we only need one LOCALCONN transport to work 1027 1031 */ 1028 1032 1029 - for (i = 0; i < NUMTRANS; i++) 1033 + for (unsigned int i = 0; i < NUMTRANS; i++) 1030 1034 { 1031 1035 if (Xtransports[i].transport->flags & TRANS_ALIAS 1032 1036 || Xtransports[i].transport->flags & TRANS_NOLISTEN) ··· 1059 1063 return -1; 1060 1064 } 1061 1065 1062 - for (i = 0; i < systemd_listen_fds && *count_ret < NUMTRANS; i++) 1066 + for (i = 0; i < systemd_listen_fds && *count_ret < (int)NUMTRANS; i++) 1063 1067 { 1064 1068 struct sockaddr_storage a; 1065 1069 int ti; ··· 1087 1091 ti = TRANS_SOCKET_INET_INDEX; 1088 1092 tn = "inet"; 1089 1093 break; 1090 - #if defined(IPv6) && defined(AF_INET6) 1094 + #ifdef IPv6 1091 1095 case AF_INET6: 1092 1096 ti = TRANS_SOCKET_INET6_INDEX; 1093 1097 tn = "inet6"; ··· 1126 1130 1127 1131 { 1128 1132 char buffer[256]; /* ??? What size ?? */ 1129 - XtransConnInfo ciptr, temp_ciptrs[NUMTRANS]; 1130 - int status, i, j; 1133 + XtransConnInfo ciptr, temp_ciptrs[NUMTRANS] = { NULL }; 1134 + int status, j; 1131 1135 1132 - #if defined(IPv6) && defined(AF_INET6) 1136 + #ifdef IPv6 1133 1137 int ipv6_succ = 0; 1134 1138 #endif 1135 1139 prmsg (2,"MakeAllCOTSServerListeners(%s,%p)\n", 1136 - port ? port : "NULL", ciptrs_ret); 1140 + port ? port : "NULL", (void *) ciptrs_ret); 1137 1141 1138 1142 *count_ret = 0; 1139 1143 ··· 1151 1155 if (receive_listening_fds(port, temp_ciptrs, count_ret) < 0) 1152 1156 return -1; 1153 1157 1154 - for (i = 0; i < NUMTRANS; i++) 1158 + for (unsigned int i = 0; i < NUMTRANS; i++) 1155 1159 { 1156 1160 Xtransport *trans = Xtransports[i].transport; 1157 1161 unsigned int flags = 0; ··· 1176 1180 trans->TransName); 1177 1181 continue; 1178 1182 } 1179 - #if defined(IPv6) && defined(AF_INET6) 1183 + #ifdef IPv6 1180 1184 if ((Xtransports[i].transport_id == TRANS_SOCKET_INET_INDEX 1181 1185 && ipv6_succ)) 1182 1186 flags |= ADDR_IN_USE_ALLOWED; ··· 1199 1203 "MakeAllCOTSServerListeners: server already running\n"); 1200 1204 1201 1205 for (j = 0; j < *count_ret; j++) 1202 - TRANS(Close) (temp_ciptrs[j]); 1206 + if (temp_ciptrs[j] != NULL) 1207 + TRANS(Close) (temp_ciptrs[j]); 1203 1208 1204 1209 *count_ret = 0; 1205 1210 *ciptrs_ret = NULL; ··· 1216 1221 } 1217 1222 } 1218 1223 1219 - #if defined(IPv6) && defined(AF_INET6) 1224 + #ifdef IPv6 1220 1225 if (Xtransports[i].transport_id == TRANS_SOCKET_INET6_INDEX) 1221 1226 ipv6_succ = 1; 1222 1227 #endif ··· 1243 1248 return -1; 1244 1249 } 1245 1250 1246 - for (i = 0; i < *count_ret; i++) 1251 + for (int i = 0; i < *count_ret; i++) 1247 1252 { 1248 1253 (*ciptrs_ret)[i] = temp_ciptrs[i]; 1249 1254 } ··· 1348 1353 uname (&name); 1349 1354 len = strlen (name.nodename); 1350 1355 if (len >= maxlen) len = maxlen - 1; 1351 - strncpy (buf, name.nodename, len); 1356 + memcpy (buf, name.nodename, len); 1352 1357 buf[len] = '\0'; 1353 1358 #else 1354 1359 buf[0] = '\0';
+8 -2
lib/libxtrans/Xtrans.h
··· 131 131 * This structure needs to be independent of the socket/TLI interface used. 132 132 */ 133 133 134 - #if defined(IPv6) && defined(AF_INET6) 134 + /* Temporary workaround for consumers whose configure scripts were 135 + generated with pre-1.6 versions of xtrans.m4 */ 136 + #if defined(IPv6) && !defined(HAVE_STRUCT_SOCKADDR_STORAGE) 137 + #define HAVE_STRUCT_SOCKADDR_STORAGE 138 + #endif 139 + 140 + #ifdef HAVE_STRUCT_SOCKADDR_STORAGE 135 141 typedef struct sockaddr_storage Xtransaddr; 136 142 #else 137 143 #define XTRANS_MAX_ADDR_LEN 128 /* large enough to hold sun_path */ ··· 316 322 317 323 int TRANS(Write)( 318 324 XtransConnInfo, /* ciptr */ 319 - char *, /* buf */ 325 + const char *, /* buf */ 320 326 int /* size */ 321 327 ); 322 328
+1 -1
lib/libxtrans/Xtransint.h
··· 239 239 240 240 int (*Write)( 241 241 XtransConnInfo, /* connection */ 242 - char *, /* buf */ 242 + const char *, /* buf */ 243 243 int /* size */ 244 244 ); 245 245
+23 -24
lib/libxtrans/Xtranslcl.c
··· 431 431 struct sockaddr_un *sockname=(struct sockaddr_un *) ciptr->addr; 432 432 struct stat statb; 433 433 434 - prmsg(2,"NAMEDResetListener(%p, %d)\n", ciptr, ciptr->fd); 434 + prmsg(2,"NAMEDResetListener(%p, %d)\n", (void *) ciptr, ciptr->fd); 435 435 436 436 if (ciptr->fd != -1) { 437 437 /* ··· 458 458 { 459 459 struct strrecvfd str; 460 460 461 - prmsg(2,"NAMEDAccept(%p->%d)\n", ciptr, ciptr->fd); 461 + prmsg(2,"NAMEDAccept(%p->%d)\n", (void *) ciptr, ciptr->fd); 462 462 463 463 if( ioctl(ciptr->fd, I_RECVFD, &str ) < 0 ) { 464 464 prmsg(1, "NAMEDAccept: ioctl(I_RECVFD) failed, errno=%d\n", errno); ··· 747 747 workingXLOCAL = freeXLOCAL = strdup (protocol); 748 748 } 749 749 else { 750 - XLOCAL=(char *)getenv("XLOCAL"); 750 + XLOCAL = getenv("XLOCAL"); 751 751 if(XLOCAL==NULL) 752 752 XLOCAL=DEF_XLOCAL; 753 753 workingXLOCAL = freeXLOCAL = strdup (XLOCAL); ··· 771 771 TRANS(LocalGetNextTransport)(void) 772 772 773 773 { 774 - int i; 775 774 char *typetocheck; 776 775 prmsg(3,"LocalGetNextTransport()\n"); 777 776 ··· 785 784 if(workingXLOCAL && *workingXLOCAL) 786 785 *workingXLOCAL++='\0'; 787 786 788 - for(i=0;i<NUMTRANSPORTS;i++) 787 + for (unsigned int i = 0; i < NUMTRANSPORTS; i++) 789 788 { 790 789 #ifndef HAVE_STRCASECMP 791 790 int j; ··· 948 947 const char *host _X_UNUSED, const char *port) 949 948 950 949 { 951 - int i; 952 950 XtransConnInfo ciptr; 953 951 954 952 prmsg(2,"LocalOpenServer(%d,%s,%s)\n", type, protocol, port); ··· 969 967 return NULL; 970 968 } 971 969 972 - for(i=1;i<NUMTRANSPORTS;i++) 970 + for (unsigned int i = 1; i < NUMTRANSPORTS; i++) 973 971 { 974 972 if( strcmp(protocol,LOCALtrans2devtab[i].transname) != 0 ) 975 973 continue; ··· 1120 1118 TRANS(LocalReopenCOTSServer)(Xtransport *thistrans, int fd, const char *port) 1121 1119 1122 1120 { 1123 - int index; 1121 + unsigned int index; 1124 1122 1125 1123 prmsg(2,"LocalReopenCOTSServer(%d,%s)\n", fd, port); 1126 1124 ··· 1161 1159 unsigned int flags _X_UNUSED) 1162 1160 1163 1161 { 1164 - prmsg(2,"LocalCreateListener(%p->%d,%s)\n",ciptr,ciptr->fd,port); 1162 + prmsg(2,"LocalCreateListener(%p->%d,%s)\n", (void *) ciptr, ciptr->fd, port); 1165 1163 1166 1164 return 0; 1167 1165 } ··· 1172 1170 { 1173 1171 LOCALtrans2dev *transptr; 1174 1172 1175 - prmsg(2,"LocalResetListener(%p)\n",ciptr); 1173 + prmsg(2,"LocalResetListener(%p)\n", (void *) ciptr); 1176 1174 1177 1175 transptr=(LOCALtrans2dev *)ciptr->priv; 1178 1176 if (transptr->devreset != NULL) { ··· 1189 1187 XtransConnInfo newciptr; 1190 1188 LOCALtrans2dev *transptr; 1191 1189 1192 - prmsg(2,"LocalAccept(%p->%d)\n", ciptr, ciptr->fd); 1190 + prmsg(2,"LocalAccept(%p->%d)\n", (void *) ciptr, ciptr->fd); 1193 1191 1194 1192 transptr=(LOCALtrans2dev *)ciptr->priv; 1195 1193 ··· 1227 1225 const char *host _X_UNUSED, const char *port) 1228 1226 1229 1227 { 1230 - prmsg(2,"LocalConnect(%p->%d,%s)\n", ciptr, ciptr->fd, port); 1228 + prmsg(2,"LocalConnect(%p->%d,%s)\n", (void *) ciptr, ciptr->fd, port); 1231 1229 1232 1230 return 0; 1233 1231 } ··· 1239 1237 TRANS(LocalBytesReadable)(XtransConnInfo ciptr, BytesReadable_t *pend ) 1240 1238 1241 1239 { 1242 - prmsg(2,"LocalBytesReadable(%p->%d,%p)\n", ciptr, ciptr->fd, pend); 1240 + prmsg(2,"LocalBytesReadable(%p->%d,%p)\n", 1241 + (void *) ciptr, ciptr->fd, (void *) pend); 1243 1242 1244 1243 return ioctl(ciptr->fd, FIONREAD, (char *)pend); 1245 1244 } ··· 1248 1247 TRANS(LocalRead)(XtransConnInfo ciptr, char *buf, int size) 1249 1248 1250 1249 { 1251 - prmsg(2,"LocalRead(%d,%p,%d)\n", ciptr->fd, buf, size ); 1250 + prmsg(2,"LocalRead(%d,%p,%d)\n", ciptr->fd, (void *) buf, size ); 1252 1251 1253 1252 return read(ciptr->fd,buf,size); 1254 1253 } 1255 1254 1256 1255 static int 1257 - TRANS(LocalWrite)(XtransConnInfo ciptr, char *buf, int size) 1256 + TRANS(LocalWrite)(XtransConnInfo ciptr, const char *buf, int size) 1258 1257 1259 1258 { 1260 - prmsg(2,"LocalWrite(%d,%p,%d)\n", ciptr->fd, buf, size ); 1259 + prmsg(2,"LocalWrite(%d,%p,%d)\n", ciptr->fd, (const void *) buf, size ); 1261 1260 1262 1261 return write(ciptr->fd,buf,size); 1263 1262 } ··· 1266 1265 TRANS(LocalReadv)(XtransConnInfo ciptr, struct iovec *buf, int size) 1267 1266 1268 1267 { 1269 - prmsg(2,"LocalReadv(%d,%p,%d)\n", ciptr->fd, buf, size ); 1268 + prmsg(2,"LocalReadv(%d,%p,%d)\n", ciptr->fd, (void *) buf, size ); 1270 1269 1271 1270 return READV(ciptr,buf,size); 1272 1271 } ··· 1275 1274 TRANS(LocalWritev)(XtransConnInfo ciptr, struct iovec *buf, int size) 1276 1275 1277 1276 { 1278 - prmsg(2,"LocalWritev(%d,%p,%d)\n", ciptr->fd, buf, size ); 1277 + prmsg(2,"LocalWritev(%d,%p,%d)\n", ciptr->fd, (const void *) buf, size ); 1279 1278 1280 1279 return WRITEV(ciptr,buf,size); 1281 1280 } ··· 1284 1283 TRANS(LocalDisconnect)(XtransConnInfo ciptr) 1285 1284 1286 1285 { 1287 - prmsg(2,"LocalDisconnect(%p->%d)\n", ciptr, ciptr->fd); 1286 + prmsg(2,"LocalDisconnect(%p->%d)\n", (void *) ciptr, ciptr->fd); 1288 1287 1289 1288 return 0; 1290 1289 } ··· 1296 1295 struct sockaddr_un *sockname=(struct sockaddr_un *) ciptr->addr; 1297 1296 int ret; 1298 1297 1299 - prmsg(2,"LocalClose(%p->%d)\n", ciptr, ciptr->fd ); 1298 + prmsg(2,"LocalClose(%p->%d)\n", (void *) ciptr, ciptr->fd ); 1300 1299 1301 1300 ret=close(ciptr->fd); 1302 1301 ··· 1318 1317 { 1319 1318 int ret; 1320 1319 1321 - prmsg(2,"LocalCloseForCloning(%p->%d)\n", ciptr, ciptr->fd ); 1320 + prmsg(2,"LocalCloseForCloning(%p->%d)\n", (void *) ciptr, ciptr->fd ); 1322 1321 1323 1322 /* Don't unlink path */ 1324 1323 ··· 1345 1344 NULL }; 1346 1345 #endif 1347 1346 1348 - Xtransport TRANS(LocalFuncs) = { 1347 + static Xtransport TRANS(LocalFuncs) = { 1349 1348 /* Local Interface */ 1350 1349 "local", 1351 1350 TRANS_ALIAS | TRANS_LOCAL, ··· 1385 1384 1386 1385 #ifdef LOCAL_TRANS_NAMED 1387 1386 1388 - Xtransport TRANS(NAMEDFuncs) = { 1387 + static Xtransport TRANS(NAMEDFuncs) = { 1389 1388 /* Local Interface */ 1390 1389 "named", 1391 1390 TRANS_LOCAL, ··· 1422 1421 TRANS(LocalCloseForCloning), 1423 1422 }; 1424 1423 1425 - Xtransport TRANS(PIPEFuncs) = { 1424 + static Xtransport TRANS(PIPEFuncs) = { 1426 1425 /* Local Interface */ 1427 1426 "pipe", 1428 1427 TRANS_ALIAS | TRANS_LOCAL,
+110 -94
lib/libxtrans/Xtranssock.c
··· 1 1 /* 2 - * Copyright (c) 2002, Oracle and/or its affiliates. 2 + * Copyright (c) 2002, 2025, Oracle and/or its affiliates. 3 3 * 4 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 5 * copy of this software and associated documentation files (the "Software"), ··· 155 155 #define BACKLOG MIN_BACKLOG 156 156 #endif 157 157 158 + #if defined(IPv6) && !defined(AF_INET6) 159 + #error "Cannot build IPv6 support without AF_INET6" 160 + #endif 161 + 162 + /* Temporary workaround for consumers whose configure scripts were 163 + generated with pre-1.6 versions of xtrans.m4 */ 164 + #if defined(IPv6) && !defined(HAVE_GETADDRINFO) 165 + #define HAVE_GETADDRINFO 166 + #endif 167 + 158 168 /* 159 169 * This is the Socket implementation of the X Transport service layer 160 170 * ··· 171 181 int protocol; 172 182 } Sockettrans2dev; 173 183 184 + /* As documented in the X(7) man page: 185 + * tcp TCP over IPv4 or IPv6 186 + * inet TCP over IPv4 only 187 + * inet6 TCP over IPv6 only 188 + * unix UNIX Domain Sockets (same host only) 189 + * local Platform preferred local connection method 190 + */ 174 191 static Sockettrans2dev Sockettrans2devtab[] = { 175 192 #ifdef TCPCONN 176 193 {"inet",AF_INET,SOCK_STREAM,SOCK_DGRAM,0}, 177 - #if !defined(IPv6) || !defined(AF_INET6) 194 + #ifndef IPv6 178 195 {"tcp",AF_INET,SOCK_STREAM,SOCK_DGRAM,0}, 179 196 #else /* IPv6 */ 180 197 {"tcp",AF_INET6,SOCK_STREAM,SOCK_DGRAM,0}, ··· 196 213 static int TRANS(SocketINETClose) (XtransConnInfo ciptr); 197 214 #endif 198 215 199 - #if defined(TCPCONN) || defined(TRANS_REOPEN) 216 + #if (defined(TCPCONN) && \ 217 + (defined(TRANS_SERVER) || defined(X11_t) || !defined(HAVE_GETADDRINFO))) \ 218 + || defined(TRANS_REOPEN) 200 219 static int 201 220 is_numeric (const char *str) 202 221 { ··· 239 258 #define MAXHOSTNAMELEN 255 240 259 #endif 241 260 242 - #if defined HAVE_SOCKLEN_T || (defined(IPv6) && defined(AF_INET6)) 261 + #if defined(HAVE_SOCKLEN_T) || defined(IPv6) 243 262 # define SOCKLEN_T socklen_t 244 263 #elif defined(SVR4) || defined(__SVR4) 245 264 # define SOCKLEN_T size_t ··· 259 278 260 279 prmsg (3,"SocketSelectFamily(%s)\n", family); 261 280 262 - for (i = first + 1; i < NUMSOCKETFAMILIES;i++) 281 + for (i = first + 1; i < (int)NUMSOCKETFAMILIES; i++) 263 282 { 264 283 if (!strcmp (family, Sockettrans2devtab[i].transname)) 265 284 return i; ··· 278 297 TRANS(SocketINETGetAddr) (XtransConnInfo ciptr) 279 298 280 299 { 281 - #if defined(IPv6) && defined(AF_INET6) 282 - struct sockaddr_storage socknamev6; 300 + #ifdef HAVE_STRUCT_SOCKADDR_STORAGE 301 + struct sockaddr_storage sockname; 283 302 #else 284 - struct sockaddr_in socknamev4; 303 + struct sockaddr_in sockname; 285 304 #endif 286 - void *socknamePtr; 287 - SOCKLEN_T namelen; 305 + void *socknamePtr = &sockname; 306 + SOCKLEN_T namelen = sizeof(sockname); 288 307 289 - prmsg (3,"SocketINETGetAddr(%p)\n", ciptr); 290 - 291 - #if defined(IPv6) && defined(AF_INET6) 292 - namelen = sizeof(socknamev6); 293 - socknamePtr = &socknamev6; 294 - #else 295 - namelen = sizeof(socknamev4); 296 - socknamePtr = &socknamev4; 297 - #endif 308 + prmsg (3,"SocketINETGetAddr(%p)\n", (void *) ciptr); 298 309 299 310 bzero(socknamePtr, namelen); 300 311 ··· 320 331 return -1; 321 332 } 322 333 323 - #if defined(IPv6) && defined(AF_INET6) 324 334 ciptr->family = ((struct sockaddr *)socknamePtr)->sa_family; 325 - #else 326 - ciptr->family = socknamev4.sin_family; 327 - #endif 328 335 ciptr->addrlen = namelen; 329 336 memcpy (ciptr->addr, socknamePtr, ciptr->addrlen); 330 337 ··· 341 348 TRANS(SocketINETGetPeerAddr) (XtransConnInfo ciptr) 342 349 343 350 { 344 - #if defined(IPv6) && defined(AF_INET6) 345 - struct sockaddr_storage socknamev6; 346 - #endif 347 - struct sockaddr_in socknamev4; 348 - void *socknamePtr; 349 - SOCKLEN_T namelen; 350 - 351 - #if defined(IPv6) && defined(AF_INET6) 352 - if (ciptr->family == AF_INET6) 353 - { 354 - namelen = sizeof(socknamev6); 355 - socknamePtr = &socknamev6; 356 - } 357 - else 351 + #ifdef HAVE_STRUCT_SOCKADDR_STORAGE 352 + struct sockaddr_storage sockname; 353 + #else 354 + struct sockaddr_in sockname; 358 355 #endif 359 - { 360 - namelen = sizeof(socknamev4); 361 - socknamePtr = &socknamev4; 362 - } 356 + void *socknamePtr = &sockname; 357 + SOCKLEN_T namelen = sizeof(sockname); 363 358 364 359 bzero(socknamePtr, namelen); 365 360 366 - prmsg (3,"SocketINETGetPeerAddr(%p)\n", ciptr); 361 + prmsg (3,"SocketINETGetPeerAddr(%p)\n", (void *) ciptr); 367 362 368 363 if (getpeername (ciptr->fd, (struct sockaddr *) socknamePtr, 369 364 (void *)&namelen) < 0) ··· 408 403 return NULL; 409 404 } 410 405 411 - if ((ciptr->fd = socket(Sockettrans2devtab[i].family, type, 412 - Sockettrans2devtab[i].protocol)) < 0 406 + ciptr->fd = socket(Sockettrans2devtab[i].family, type, 407 + Sockettrans2devtab[i].protocol); 408 + 413 409 #ifndef WIN32 414 410 #if (defined(X11_t) && !defined(USE_POLL)) || defined(FS_t) || defined(FONT_t) 415 - || ciptr->fd >= sysconf(_SC_OPEN_MAX) 411 + if (ciptr->fd >= sysconf(_SC_OPEN_MAX)) 412 + { 413 + prmsg (2, "SocketOpen: socket() returned out of range fd %d\n", 414 + ciptr->fd); 415 + close (ciptr->fd); 416 + ciptr->fd = -1; 417 + } 416 418 #endif 417 419 #endif 418 - ) { 420 + 421 + if (ciptr->fd < 0) { 419 422 #ifdef WIN32 420 423 errno = WSAGetLastError(); 421 424 #endif ··· 428 431 429 432 #ifdef TCP_NODELAY 430 433 if (Sockettrans2devtab[i].family == AF_INET 431 - #if defined(IPv6) && defined(AF_INET6) 434 + #ifdef IPv6 432 435 || Sockettrans2devtab[i].family == AF_INET6 433 436 #endif 434 437 ) ··· 563 566 TRANS(SocketOpenCOTSClientBase) (const char *transname, const char *protocol, 564 567 const char *host, const char *port, int previndex) 565 568 { 566 - XtransConnInfo ciptr; 569 + XtransConnInfo ciptr = NULL; 567 570 int i = previndex; 568 571 569 572 prmsg (2, "SocketOpenCOTSClient(%s,%s,%s)\n", ··· 612 615 const char *host, const char *port) 613 616 614 617 { 615 - XtransConnInfo ciptr; 618 + XtransConnInfo ciptr = NULL; 616 619 int i = -1; 617 620 618 621 prmsg (2,"SocketOpenCOTSServer(%s,%s,%s)\n", protocol, host, port); ··· 652 655 */ 653 656 654 657 if (Sockettrans2devtab[i].family == AF_INET 655 - #if defined(IPv6) && defined(AF_INET6) 658 + #ifdef IPv6 656 659 || Sockettrans2devtab[i].family == AF_INET6 657 660 #endif 658 661 ) ··· 732 735 set_sun_path(const char *port, const char *upath, char *path, int abstract) 733 736 { 734 737 struct sockaddr_un s; 735 - int maxlen = sizeof(s.sun_path) - 1; 738 + ssize_t maxlen = sizeof(s.sun_path) - 1; 736 739 const char *at = ""; 737 740 738 741 if (!port || !*port || !path) ··· 748 751 if (*port == '/') /* a full pathname */ 749 752 upath = ""; 750 753 751 - if (strlen(port) + strlen(upath) > maxlen) 754 + if ((ssize_t)(strlen(at) + strlen(upath) + strlen(port)) > maxlen) 752 755 return -1; 753 756 snprintf(path, sizeof(s.sun_path), "%s%s%s", at, upath, port); 754 757 return 0; ··· 767 770 int fd = ciptr->fd; 768 771 int retry; 769 772 770 - prmsg (3, "SocketCreateListener(%p,%d)\n", ciptr, fd); 773 + prmsg (3, "SocketCreateListener(%p,%d)\n", (void *) ciptr, fd); 771 774 772 775 if (Sockettrans2devtab[ciptr->index].family == AF_INET 773 - #if defined(IPv6) && defined(AF_INET6) 776 + #ifdef IPv6 774 777 || Sockettrans2devtab[ciptr->index].family == AF_INET6 775 778 #endif 776 779 ) ··· 778 781 else 779 782 retry = 0; 780 783 781 - while (bind (fd, (struct sockaddr *) sockname, namelen) < 0) 784 + while (bind (fd, sockname, namelen) < 0) 782 785 { 783 786 if (errno == EADDRINUSE) { 784 787 if (flags & ADDR_IN_USE_ALLOWED) ··· 800 803 } 801 804 802 805 if (Sockettrans2devtab[ciptr->index].family == AF_INET 803 - #if defined(IPv6) && defined(AF_INET6) 806 + #ifdef IPv6 804 807 || Sockettrans2devtab[ciptr->index].family == AF_INET6 805 808 #endif 806 809 ) { ··· 837 840 unsigned int flags) 838 841 839 842 { 840 - #if defined(IPv6) && defined(AF_INET6) 843 + #ifdef HAVE_STRUCT_SOCKADDR_STORAGE 841 844 struct sockaddr_storage sockname; 842 845 #else 843 846 struct sockaddr_in sockname; ··· 911 914 sport = 0; 912 915 913 916 bzero(&sockname, sizeof(sockname)); 914 - #if defined(IPv6) && defined(AF_INET6) 915 917 if (Sockettrans2devtab[ciptr->index].family == AF_INET) { 916 918 namelen = sizeof (struct sockaddr_in); 917 919 #ifdef BSD44SOCKETS ··· 921 923 ((struct sockaddr_in *)&sockname)->sin_port = htons(sport); 922 924 ((struct sockaddr_in *)&sockname)->sin_addr.s_addr = htonl(INADDR_ANY); 923 925 } else { 926 + #ifdef IPv6 924 927 namelen = sizeof (struct sockaddr_in6); 925 928 #ifdef SIN6_LEN 926 929 ((struct sockaddr_in6 *)&sockname)->sin6_len = (u_int8_t)sizeof(sockname); ··· 928 931 ((struct sockaddr_in6 *)&sockname)->sin6_family = AF_INET6; 929 932 ((struct sockaddr_in6 *)&sockname)->sin6_port = htons(sport); 930 933 ((struct sockaddr_in6 *)&sockname)->sin6_addr = in6addr_any; 931 - } 932 934 #else 933 - #ifdef BSD44SOCKETS 934 - sockname.sin_len = sizeof (sockname); 935 + prmsg (1, 936 + "SocketINETCreateListener: unsupported address family %d\n", 937 + Sockettrans2devtab[ciptr->index].family); 938 + return TRANS_CREATE_LISTENER_FAILED; 935 939 #endif 936 - sockname.sin_family = AF_INET; 937 - sockname.sin_port = htons (sport); 938 - sockname.sin_addr.s_addr = htonl (INADDR_ANY); 939 - #endif 940 + } 940 941 941 942 if ((status = TRANS(SocketCreateListener) (ciptr, 942 943 (struct sockaddr *) &sockname, namelen, flags)) < 0) ··· 1084 1085 abstract = ciptr->transptr->flags & TRANS_ABSTRACT; 1085 1086 #endif 1086 1087 1087 - prmsg (3, "SocketUNIXResetListener(%p,%d)\n", ciptr, ciptr->fd); 1088 + prmsg (3, "SocketUNIXResetListener(%p,%d)\n", (void *) ciptr, ciptr->fd); 1088 1089 1089 1090 if (!abstract && ( 1090 1091 stat (unsock->sun_path, &statb) == -1 || ··· 1158 1159 struct sockaddr_in sockname; 1159 1160 SOCKLEN_T namelen = sizeof(sockname); 1160 1161 1161 - prmsg (2, "SocketINETAccept(%p,%d)\n", ciptr, ciptr->fd); 1162 + prmsg (2, "SocketINETAccept(%p,%d)\n", (void *) ciptr, ciptr->fd); 1162 1163 1163 1164 if ((newciptr = calloc (1, sizeof(struct _XtransConnInfo))) == NULL) 1164 1165 { ··· 1234 1235 struct sockaddr_un sockname; 1235 1236 SOCKLEN_T namelen = sizeof sockname; 1236 1237 1237 - prmsg (2, "SocketUNIXAccept(%p,%d)\n", ciptr, ciptr->fd); 1238 + prmsg (2, "SocketUNIXAccept(%p,%d)\n", (void *) ciptr, ciptr->fd); 1238 1239 1239 1240 if ((newciptr = calloc (1, sizeof(struct _XtransConnInfo))) == NULL) 1240 1241 { ··· 1306 1307 1307 1308 #ifdef TCPCONN 1308 1309 1309 - #if defined(IPv6) && defined(AF_INET6) 1310 + #ifdef HAVE_GETADDRINFO 1310 1311 struct addrlist { 1311 1312 struct addrinfo * addr; 1312 1313 struct addrinfo * firstaddr; ··· 1325 1326 struct sockaddr * socketaddr = NULL; 1326 1327 int socketaddrlen = 0; 1327 1328 int res; 1328 - #if defined(IPv6) && defined(AF_INET6) 1329 + #ifdef HAVE_GETADDRINFO 1329 1330 struct addrinfo hints; 1330 1331 char ntopbuf[INET6_ADDRSTRLEN]; 1331 1332 int resetonce = 0; ··· 1372 1373 } 1373 1374 #endif 1374 1375 1375 - #if defined(IPv6) && defined(AF_INET6) 1376 + #ifdef HAVE_GETADDRINFO 1376 1377 { 1377 1378 if (addrlist != NULL) { 1378 1379 if (strcmp(host,addrlist->host) || strcmp(port,addrlist->port)) { ··· 1382 1383 } 1383 1384 } else { 1384 1385 addrlist = malloc(sizeof(struct addrlist)); 1386 + if (addrlist == NULL) { 1387 + prmsg (1, "SocketINETConnect() can't allocate memory " 1388 + "for addrlist: %s\n", strerror(errno)); 1389 + return TRANS_CONNECT_FAILED; 1390 + } 1385 1391 addrlist->firstaddr = NULL; 1386 1392 } 1387 1393 ··· 1392 1398 addrlist->host[sizeof(addrlist->host) - 1] = '\0'; 1393 1399 1394 1400 bzero(&hints,sizeof(hints)); 1401 + #ifdef IPv6 1402 + if (strcmp(Sockettrans2devtab[ciptr->index].transname, "tcp") == 0) 1403 + hints.ai_family = AF_UNSPEC; 1404 + else 1405 + #endif 1406 + hints.ai_family = Sockettrans2devtab[ciptr->index].family; 1395 1407 hints.ai_socktype = Sockettrans2devtab[ciptr->index].devcotsname; 1396 1408 1397 1409 res = getaddrinfo(host,port,&hints,&addrlist->firstaddr); ··· 1437 1449 prmsg (4,"SocketINETConnect() sockname.sin_port = %d\n", 1438 1450 ntohs(sin->sin_port)); 1439 1451 1452 + #ifdef IPv6 1440 1453 if (Sockettrans2devtab[ciptr->index].family == AF_INET6) { 1441 1454 if (strcmp(Sockettrans2devtab[ciptr->index].transname, 1442 1455 "tcp") == 0) { ··· 1505 1518 prmsg (4,"SocketINETConnect() Skipping IPv6 address\n"); 1506 1519 } 1507 1520 } 1521 + #endif /* IPv6 */ 1508 1522 } else { 1509 1523 socketaddr = NULL; /* Unsupported address type */ 1510 1524 } ··· 1513 1527 } 1514 1528 } 1515 1529 } 1516 - #else 1530 + #else /* !HAVE_GETADDRINFO */ 1517 1531 { 1518 1532 /* 1519 1533 * Build the socket name. ··· 1637 1651 */ 1638 1652 1639 1653 if (olderrno == ECONNREFUSED || olderrno == EINTR 1640 - #if defined(IPv6) && defined(AF_INET6) 1654 + #ifdef HAVE_GETADDRINFO 1641 1655 || (((addrlist->addr->ai_next != NULL) || 1642 1656 (addrlist->addr != addrlist->firstaddr)) && 1643 1657 (olderrno == ENETUNREACH || olderrno == EAFNOSUPPORT || ··· 1681 1695 } 1682 1696 } 1683 1697 1684 - #if defined(IPv6) && defined(AF_INET6) 1698 + #ifdef HAVE_GETADDRINFO 1685 1699 if (res != 0) { 1686 1700 addrlist->addr = addrlist->addr->ai_next; 1687 1701 } ··· 1712 1726 { 1713 1727 return (1); 1714 1728 } else { 1715 - #if defined(IPv6) && defined(AF_INET6) 1729 + #ifdef HAVE_GETADDRINFO 1716 1730 struct addrinfo *localhostaddr; 1717 1731 struct addrinfo *otherhostaddr; 1718 1732 struct addrinfo *i, *j; ··· 1739 1753 if (memcmp(A,B,sizeof(struct in_addr)) == 0) { 1740 1754 equiv = 1; 1741 1755 } 1756 + #ifdef IPv6 1742 1757 } else if (i->ai_family == AF_INET6) { 1743 1758 struct sockaddr_in6 *sinA 1744 1759 = (struct sockaddr_in6 *) i->ai_addr; ··· 1750 1765 if (memcmp(A,B,sizeof(struct in6_addr)) == 0) { 1751 1766 equiv = 1; 1752 1767 } 1768 + #endif /* IPv6 */ 1753 1769 } 1754 1770 } 1755 1771 } ··· 1758 1774 freeaddrinfo(localhostaddr); 1759 1775 freeaddrinfo(otherhostaddr); 1760 1776 return equiv; 1761 - #else 1777 + #else /* !HAVE_GETADDRINFO */ 1762 1778 /* 1763 1779 * A host may have more than one network address. If any of the 1764 1780 * network addresses of 'host' (specified to the connect call) ··· 1964 1980 1965 1981 { 1966 1982 prmsg (2,"SocketBytesReadable(%p,%d,%p)\n", 1967 - ciptr, ciptr->fd, pend); 1983 + (void *) ciptr, ciptr->fd, (void *) pend); 1968 1984 #ifdef WIN32 1969 1985 { 1970 1986 int ret = ioctlsocket ((SOCKET) ciptr->fd, FIONREAD, (u_long *) pend); ··· 2087 2103 TRANS(SocketRead) (XtransConnInfo ciptr, char *buf, int size) 2088 2104 2089 2105 { 2090 - prmsg (2,"SocketRead(%d,%p,%d)\n", ciptr->fd, buf, size); 2106 + prmsg (2,"SocketRead(%d,%p,%d)\n", ciptr->fd, (void *) buf, size); 2091 2107 2092 2108 #if defined(WIN32) 2093 2109 { ··· 2141 2157 TRANS(SocketReadv) (XtransConnInfo ciptr, struct iovec *buf, int size) 2142 2158 2143 2159 { 2144 - prmsg (2,"SocketReadv(%d,%p,%d)\n", ciptr->fd, buf, size); 2160 + prmsg (2,"SocketReadv(%d,%p,%d)\n", ciptr->fd, (void *) buf, size); 2145 2161 2146 2162 #if XTRANS_SEND_FDS 2147 2163 { ··· 2182 2198 TRANS(SocketWritev) (XtransConnInfo ciptr, struct iovec *buf, int size) 2183 2199 2184 2200 { 2185 - prmsg (2,"SocketWritev(%d,%p,%d)\n", ciptr->fd, buf, size); 2201 + prmsg (2,"SocketWritev(%d,%p,%d)\n", ciptr->fd, (void *) buf, size); 2186 2202 2187 2203 #if XTRANS_SEND_FDS 2188 2204 if (ciptr->send_fds) ··· 2224 2240 2225 2241 2226 2242 static int 2227 - TRANS(SocketWrite) (XtransConnInfo ciptr, char *buf, int size) 2243 + TRANS(SocketWrite) (XtransConnInfo ciptr, const char *buf, int size) 2228 2244 2229 2245 { 2230 - prmsg (2,"SocketWrite(%d,%p,%d)\n", ciptr->fd, buf, size); 2246 + prmsg (2,"SocketWrite(%d,%p,%d)\n", ciptr->fd, (const void *) buf, size); 2231 2247 2232 2248 #if defined(WIN32) 2233 2249 { ··· 2243 2259 { 2244 2260 struct iovec iov; 2245 2261 2246 - iov.iov_base = buf; 2262 + iov.iov_base = (void *) buf; 2247 2263 iov.iov_len = size; 2248 2264 return TRANS(SocketWritev)(ciptr, &iov, 1); 2249 2265 } ··· 2256 2272 TRANS(SocketDisconnect) (XtransConnInfo ciptr) 2257 2273 2258 2274 { 2259 - prmsg (2,"SocketDisconnect(%p,%d)\n", ciptr, ciptr->fd); 2275 + prmsg (2,"SocketDisconnect(%p,%d)\n", (void *) ciptr, ciptr->fd); 2260 2276 2261 2277 #ifdef WIN32 2262 2278 { ··· 2275 2291 TRANS(SocketINETClose) (XtransConnInfo ciptr) 2276 2292 2277 2293 { 2278 - prmsg (2,"SocketINETClose(%p,%d)\n", ciptr, ciptr->fd); 2294 + prmsg (2,"SocketINETClose(%p,%d)\n", (void *) ciptr, ciptr->fd); 2279 2295 2280 2296 #ifdef WIN32 2281 2297 { ··· 2303 2319 struct sockaddr_un *sockname = (struct sockaddr_un *) ciptr->addr; 2304 2320 int ret; 2305 2321 2306 - prmsg (2,"SocketUNIXClose(%p,%d)\n", ciptr, ciptr->fd); 2322 + prmsg (2,"SocketUNIXClose(%p,%d)\n", (void *) ciptr, ciptr->fd); 2307 2323 2308 2324 #if XTRANS_SEND_FDS 2309 2325 cleanupFds(ciptr); ··· 2334 2350 int ret; 2335 2351 2336 2352 prmsg (2,"SocketUNIXCloseForCloning(%p,%d)\n", 2337 - ciptr, ciptr->fd); 2353 + (void *) ciptr, ciptr->fd); 2338 2354 2339 2355 #if XTRANS_SEND_FDS 2340 2356 cleanupFds(ciptr); ··· 2351 2367 # ifdef TRANS_SERVER 2352 2368 static const char* tcp_nolisten[] = { 2353 2369 "inet", 2354 - #if defined(IPv6) && defined(AF_INET6) 2370 + #ifdef IPv6 2355 2371 "inet6", 2356 2372 #endif 2357 2373 NULL 2358 2374 }; 2359 2375 # endif 2360 2376 2361 - Xtransport TRANS(SocketTCPFuncs) = { 2377 + static Xtransport TRANS(SocketTCPFuncs) = { 2362 2378 /* Socket Interface */ 2363 2379 "tcp", 2364 2380 TRANS_ALIAS, ··· 2395 2411 TRANS(SocketINETClose), 2396 2412 }; 2397 2413 2398 - Xtransport TRANS(SocketINETFuncs) = { 2414 + static Xtransport TRANS(SocketINETFuncs) = { 2399 2415 /* Socket Interface */ 2400 2416 "inet", 2401 2417 0, ··· 2432 2448 TRANS(SocketINETClose), 2433 2449 }; 2434 2450 2435 - #if defined(IPv6) && defined(AF_INET6) 2436 - Xtransport TRANS(SocketINET6Funcs) = { 2451 + #ifdef IPv6 2452 + static Xtransport TRANS(SocketINET6Funcs) = { 2437 2453 /* Socket Interface */ 2438 2454 "inet6", 2439 2455 0, ··· 2474 2490 2475 2491 #ifdef UNIXCONN 2476 2492 #if !defined(LOCALCONN) 2477 - Xtransport TRANS(SocketLocalFuncs) = { 2493 + static Xtransport TRANS(SocketLocalFuncs) = { 2478 2494 /* Socket Interface */ 2479 2495 "local", 2480 2496 #ifdef HAVE_ABSTRACT_SOCKETS ··· 2521 2537 # endif 2522 2538 # endif 2523 2539 2524 - Xtransport TRANS(SocketUNIXFuncs) = { 2540 + static Xtransport TRANS(SocketUNIXFuncs) = { 2525 2541 /* Socket Interface */ 2526 2542 "unix", 2527 2543 #if !defined(LOCALCONN) && !defined(HAVE_ABSTRACT_SOCKETS)
+34 -17
lib/libxtrans/Xtransutil.c
··· 62 62 #include <X11/Xwinsock.h> 63 63 #endif 64 64 65 + #if defined(IPv6) && !defined(AF_INET6) 66 + #error "Cannot build IPv6 support without AF_INET6" 67 + #endif 68 + 69 + /* Temporary workaround for consumers whose configure scripts were 70 + generated with pre-1.6 versions of xtrans.m4 */ 71 + #if defined(IPv6) && !defined(HAVE_INET_NTOP) 72 + #define HAVE_INET_NTOP 73 + #endif 74 + 65 75 #ifdef X11_t 66 76 67 77 /* ··· 123 133 break; 124 134 } 125 135 126 - #if defined(IPv6) && defined(AF_INET6) 136 + #ifdef IPv6 127 137 case AF_INET6: 128 138 { 129 139 struct sockaddr_in6 saddr6; ··· 252 262 len = 3 + strlen (transName) + 253 263 strlen (hostnamebuf) + strlen (saddr->sun_path); 254 264 networkId = (char *) malloc (len); 255 - snprintf (networkId, len, "%s/%s:%s", transName, 256 - hostnamebuf, saddr->sun_path); 265 + if (networkId != NULL) 266 + snprintf (networkId, len, "%s/%s:%s", transName, 267 + hostnamebuf, saddr->sun_path); 257 268 break; 258 269 } 259 270 #endif /* defined(UNIXCONN) || defined(LOCALCONN) */ 260 271 261 272 #if defined(TCPCONN) 262 273 case AF_INET: 263 - #if defined(IPv6) && defined(AF_INET6) 274 + #ifdef IPv6 264 275 case AF_INET6: 265 276 #endif 266 277 { 267 278 struct sockaddr_in *saddr = (struct sockaddr_in *) addr; 268 - #if defined(IPv6) && defined(AF_INET6) 279 + #ifdef IPv6 269 280 struct sockaddr_in6 *saddr6 = (struct sockaddr_in6 *) addr; 270 281 #endif 271 282 int portnum; 272 283 char portnumbuf[10]; 273 284 274 285 275 - #if defined(IPv6) && defined(AF_INET6) 286 + #ifdef IPv6 276 287 if (family == AF_INET6) 277 288 portnum = ntohs (saddr6->sin6_port); 278 289 else ··· 283 294 len = 3 + strlen (transName) + 284 295 strlen (hostnamebuf) + strlen (portnumbuf); 285 296 networkId = (char *) malloc (len); 286 - snprintf (networkId, len, "%s/%s:%s", transName, hostnamebuf, 287 - portnumbuf); 297 + if (networkId != NULL) 298 + snprintf (networkId, len, "%s/%s:%s", transName, hostnamebuf, 299 + portnumbuf); 288 300 break; 289 301 } 290 302 #endif /* defined(TCPCONN) */ 303 + 291 304 292 305 default: 293 306 break; ··· 337 350 338 351 #if defined(TCPCONN) 339 352 case AF_INET: 340 - #if defined(IPv6) && defined(AF_INET6) 353 + #ifdef IPv6 341 354 case AF_INET6: 342 355 #endif 343 356 { 344 357 struct sockaddr_in *saddr = (struct sockaddr_in *) peer_addr; 345 - #if defined(IPv6) && defined(AF_INET6) 358 + #ifdef IPv6 346 359 struct sockaddr_in6 *saddr6 = (struct sockaddr_in6 *) peer_addr; 347 360 #endif 348 361 char *address; ··· 352 365 #endif 353 366 struct hostent * volatile hostp = NULL; 354 367 355 - #if defined(IPv6) && defined(AF_INET6) 368 + #ifdef IPv6 356 369 if (family == AF_INET6) 357 370 { 358 371 address = (char *) &saddr6->sin6_addr; ··· 387 400 if (hostp != NULL) 388 401 addr = hostp->h_name; 389 402 else 390 - #if defined(IPv6) && defined(AF_INET6) 403 + #ifdef HAVE_INET_NTOP 391 404 addr = inet_ntop (family, address, addrbuf, sizeof (addrbuf)); 392 405 #else 393 406 addr = inet_ntoa (saddr->sin_addr); ··· 397 410 398 411 #endif /* defined(TCPCONN) */ 399 412 413 + 400 414 default: 401 415 return (NULL); 402 416 } 417 + 403 418 404 419 len = strlen (ciptr->transptr->TransName) + strlen (addr) + 2; 405 420 hostname = (char *) malloc (len); 406 - strlcpy (hostname, ciptr->transptr->TransName, len); 407 - strlcat (hostname, "/", len); 408 - if (addr) 409 - strlcat (hostname, addr, len); 410 - 421 + if (hostname) 422 + { 423 + strlcpy (hostname, ciptr->transptr->TransName, len); 424 + strlcat (hostname, "/", len); 425 + if (addr) 426 + strlcat (hostname, addr, len); 427 + } 411 428 return (hostname); 412 429 } 413 430
+7 -4
lib/libxtrans/compile
··· 1 1 #! /bin/sh 2 2 # Wrapper for compilers which do not understand '-c -o'. 3 3 4 - scriptversion=2018-03-07.03; # UTC 4 + scriptversion=2024-06-19.01; # UTC 5 5 6 - # Copyright (C) 1999-2021 Free Software Foundation, Inc. 6 + # Copyright (C) 1999-2024 Free Software Foundation, Inc. 7 7 # Written by Tom Tromey <tromey@cygnus.com>. 8 8 # 9 9 # This program is free software; you can redistribute it and/or modify ··· 143 143 # configure might choose to run compile as 'compile cc -o foo foo.c'. 144 144 eat=1 145 145 case $2 in 146 - *.o | *.[oO][bB][jJ]) 146 + *.o | *.lo | *.[oO][bB][jJ]) 147 147 func_file_conv "$2" 148 148 set x "$@" -Fo"$file" 149 149 shift ··· 248 248 right script to run: please start by reading the file 'INSTALL'. 249 249 250 250 Report bugs to <bug-automake@gnu.org>. 251 + GNU Automake home page: <https://www.gnu.org/software/automake/>. 252 + General help using GNU software: <https://www.gnu.org/gethelp/>. 251 253 EOF 252 254 exit $? 253 255 ;; 254 256 -v | --v*) 255 - echo "compile $scriptversion" 257 + echo "compile (GNU Automake) $scriptversion" 256 258 exit $? 257 259 ;; 258 260 cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ 261 + clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \ 259 262 icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) 260 263 func_cl_wrapper "$@" # Doesn't return... 261 264 ;;
+15 -15
lib/libxtrans/configure
··· 1 1 #! /bin/sh 2 2 # Guess values for system-dependent variables and create Makefiles. 3 - # Generated by GNU Autoconf 2.71 for xtrans 1.5.0. 3 + # Generated by GNU Autoconf 2.71 for xtrans 1.6.0. 4 4 # 5 - # Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libxtrans/issues>. 5 + # Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/issues>. 6 6 # 7 7 # 8 8 # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, ··· 268 268 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." 269 269 else 270 270 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and 271 - $0: https://gitlab.freedesktop.org/xorg/lib/libxtrans/issues 271 + $0: https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/issues 272 272 $0: about your system, including any error possibly output 273 273 $0: before this message. Then install a modern shell, or 274 274 $0: manually run the script under such a shell if you do ··· 672 672 # Identity of this package. 673 673 PACKAGE_NAME='xtrans' 674 674 PACKAGE_TARNAME='xtrans' 675 - PACKAGE_VERSION='1.5.0' 676 - PACKAGE_STRING='xtrans 1.5.0' 677 - PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/lib/libxtrans/issues' 675 + PACKAGE_VERSION='1.6.0' 676 + PACKAGE_STRING='xtrans 1.6.0' 677 + PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/issues' 678 678 PACKAGE_URL='' 679 679 680 680 ac_unique_file="Makefile.am" ··· 1426 1426 # Omit some internal or obsolete options to make the list less imposing. 1427 1427 # This message is too long to be a string in the A/UX 3.1 sh. 1428 1428 cat <<_ACEOF 1429 - \`configure' configures xtrans 1.5.0 to adapt to many kinds of systems. 1429 + \`configure' configures xtrans 1.6.0 to adapt to many kinds of systems. 1430 1430 1431 1431 Usage: $0 [OPTION]... [VAR=VALUE]... 1432 1432 ··· 1497 1497 1498 1498 if test -n "$ac_init_help"; then 1499 1499 case $ac_init_help in 1500 - short | recursive ) echo "Configuration of xtrans 1.5.0:";; 1500 + short | recursive ) echo "Configuration of xtrans 1.6.0:";; 1501 1501 esac 1502 1502 cat <<\_ACEOF 1503 1503 ··· 1551 1551 Use these variables to override the choices made by `configure' or to help 1552 1552 it to find libraries and programs with nonstandard names/locations. 1553 1553 1554 - Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libxtrans/issues>. 1554 + Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/issues>. 1555 1555 _ACEOF 1556 1556 ac_status=$? 1557 1557 fi ··· 1615 1615 test -n "$ac_init_help" && exit $ac_status 1616 1616 if $ac_init_version; then 1617 1617 cat <<\_ACEOF 1618 - xtrans configure 1.5.0 1618 + xtrans configure 1.6.0 1619 1619 generated by GNU Autoconf 2.71 1620 1620 1621 1621 Copyright (C) 2021 Free Software Foundation, Inc. ··· 1885 1885 This file contains any messages produced by compilers while 1886 1886 running configure, to aid debugging if configure makes a mistake. 1887 1887 1888 - It was created by xtrans $as_me 1.5.0, which was 1888 + It was created by xtrans $as_me 1.6.0, which was 1889 1889 generated by GNU Autoconf 2.71. Invocation command line was 1890 1890 1891 1891 $ $0$ac_configure_args_raw ··· 3120 3120 3121 3121 # Define the identity of the package. 3122 3122 PACKAGE='xtrans' 3123 - VERSION='1.5.0' 3123 + VERSION='1.6.0' 3124 3124 3125 3125 3126 3126 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h ··· 12049 12049 # report actual input values of CONFIG_FILES etc. instead of their 12050 12050 # values after options handling. 12051 12051 ac_log=" 12052 - This file was extended by xtrans $as_me 1.5.0, which was 12052 + This file was extended by xtrans $as_me 1.6.0, which was 12053 12053 generated by GNU Autoconf 2.71. Invocation command line was 12054 12054 12055 12055 CONFIG_FILES = $CONFIG_FILES ··· 12100 12100 Configuration commands: 12101 12101 $config_commands 12102 12102 12103 - Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libxtrans/issues>." 12103 + Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/issues>." 12104 12104 12105 12105 _ACEOF 12106 12106 ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` ··· 12108 12108 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 12109 12109 ac_cs_config='$ac_cs_config_escaped' 12110 12110 ac_cs_version="\\ 12111 - xtrans config.status 1.5.0 12111 + xtrans config.status 1.6.0 12112 12112 configured by $0, generated by GNU Autoconf 2.71, 12113 12113 with options \\"\$ac_cs_config\\" 12114 12114
+2 -2
lib/libxtrans/configure.ac
··· 21 21 22 22 # Initialize Autoconf 23 23 AC_PREREQ([2.60]) 24 - AC_INIT([xtrans], [1.5.0], 25 - [https://gitlab.freedesktop.org/xorg/lib/libxtrans/issues], [xtrans]) 24 + AC_INIT([xtrans], [1.6.0], 25 + [https://gitlab.freedesktop.org/xorg/lib/libxtrans/-/issues], [xtrans]) 26 26 AC_CONFIG_SRCDIR([Makefile.am]) 27 27 28 28 # Initialize Automake
+2 -2
lib/libxtrans/doc/xtrans.xml
··· 243 243 244 244 int (*Write)( 245 245 XtransConnInfo, /* connection */ 246 - char *, /* buf */ 246 + const char *, /* buf */ 247 247 int /* size */ 248 248 ); 249 249 ··· 541 541 <funcprototype> 542 542 <funcdef>int <function>TRANS(Write)</function></funcdef> 543 543 <paramdef>XtransConnInfo <parameter>connection</parameter></paramdef> 544 - <paramdef>char *<parameter>buf</parameter></paramdef> 544 + <paramdef>const char *<parameter>buf</parameter></paramdef> 545 545 <paramdef>int <parameter>size</parameter></paramdef> 546 546 </funcprototype> 547 547 </funcsynopsis>
+8 -4
lib/libxtrans/xtrans.m4
··· 1 1 dnl 2 - dnl Copyright (c) 2005, Oracle and/or its affiliates. 2 + dnl Copyright (c) 2005, 2025, Oracle and/or its affiliates. 3 3 dnl 4 4 dnl Permission is hereby granted, free of charge, to any person obtaining a 5 5 dnl copy of this software and associated documentation files (the "Software"), ··· 33 33 fi 34 34 35 35 # Needs to come after above checks for libsocket & libnsl for SVR4 systems 36 + AC_CHECK_FUNCS([getaddrinfo inet_ntop]) 37 + 36 38 AC_ARG_ENABLE(ipv6, 37 39 AS_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), 38 40 [IPV6CONN=$enableval], 39 - [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) 41 + [IPV6CONN=$ac_cv_func_getaddrinfo]) 40 42 AC_MSG_CHECKING([if IPv6 support should be built]) 41 43 if test "$IPV6CONN" = "yes"; then 42 44 AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) ··· 53 55 ]) 54 56 55 57 # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. 56 - AC_CHECK_TYPES([socklen_t], [], [], [ 58 + # and added a type defined to be large enough to hold any sockaddr format. 59 + AC_CHECK_TYPES([socklen_t, struct sockaddr_storage], [], [], [ 57 60 AC_INCLUDES_DEFAULT 58 - #include <sys/socket.h>]) 61 + #include <sys/socket.h> 62 + ]) 59 63 60 64 # XPG4v2/UNIX95 added msg_control - check to see if we need to define 61 65 # _XOPEN_SOURCE to get it (such as on Solaris)
+1
lib/libxtrans/xtrans.pc.in
··· 5 5 6 6 Name: XTrans 7 7 Description: Abstract network code for X 8 + URL: https://gitlab.freedesktop.org/xorg/lib/libxtrans 8 9 Version: @PACKAGE_VERSION@ 9 10 Cflags: -I${includedir} -D_DEFAULT_SOURCE -D_BSD_SOURCE @fchown_define@ @sticky_bit_define@