Skip to content

Commit 76dccd8

Browse files
committed
Fix GH-9518: Disabling IPv6 support disables unrelated constants
We need to properly terminate the "conditional compilation" in stub files. Closes GH-9520.
1 parent 6c4d24e commit 76dccd8

File tree

3 files changed

+24
-44
lines changed

3 files changed

+24
-44
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ PHP NEWS
1616
- Standard:
1717
. Marked crypt()'s $string parameter as #[\SensitiveParameter]. (timwolla)
1818
. Fixed bug GH-9464 (build on older macOs releases). (David Bohman)
19+
. Fixed bug GH-9518 (Disabling IPv6 support disables unrelated constants).
20+
(cmb)
1921

2022
01 Sep 2022, PHP 8.2.0RC1
2123

ext/standard/file.stub.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@
278278
* @cvalue PF_INET
279279
*/
280280
const STREAM_PF_INET = UNKNOWN;
281+
#endif
281282
#if (!defined(PF_INET) && defined(AF_INET))
282283
/**
283284
* @var int
@@ -286,13 +287,15 @@
286287
const STREAM_PF_INET = UNKNOWN;
287288
#endif
288289

290+
289291
#ifdef HAVE_IPV6
290292
#ifdef PF_INET6
291293
/**
292294
* @var int
293295
* @cvalue PF_INET6
294296
*/
295297
const STREAM_PF_INET6 = UNKNOWN;
298+
#endif
296299
#if (!defined(PF_INET6) && defined(AF_INET6))
297300
/**
298301
* @var int
@@ -308,6 +311,7 @@
308311
* @cvalue PF_UNIX
309312
*/
310313
const STREAM_PF_UNIX = UNKNOWN;
314+
#endif
311315
#if (!defined(PF_UNIX) && defined(AF_UNIX))
312316
/**
313317
* @var int

ext/standard/file_arginfo.h

Lines changed: 18 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)