Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2a96af7

Browse files
committed
fix build warnings for Haiku.
especially linker warning about php binary having an executable stack. cloe GH-19575
1 parent 366a5a2 commit 2a96af7

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

‎NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ PHP NEWS
1212
. Using null as an array offset or when calling array_key_exists() is now
1313
deprecated. (alexandre-daubois)
1414
. Fixed bug GH-19681 (PHP_EXPAND_PATH broken with bash 5.3.0). (Remi)
15+
. Marks the stack as non-executable on Haiku. (David Carlier)
1516

1617
- CLI:
1718
. Fixed bug GH-19461 (Improve error message on listening error with IPv6

‎configure.ac

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,12 @@ dnl supports it. This can help reduce the binary size and startup time.
217217
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],
218218
[CFLAGS="$CFLAGS -fvisibility=hidden"])
219219

220+
dnl to disable executable stack on haiku due
221+
dnl to missing elf .note.GNU-stack part
220222
case $host_alias in
223+
*haiku*)
224+
LDFLAGS="$LDFLAGS -Wl,-z,noexecstack"
225+
;;
221226
*solaris*)
222227
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
223228
;;

‎ext/sockets/sockets.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ ZEND_DECLARE_MODULE_GLOBALS(sockets)
109109
} \
110110
} while (0)
111111
#else
112-
#define PHP_ETH_PROTO_CHECK(protocol, family) (0)
112+
#define PHP_ETH_PROTO_CHECK(protocol, family) \
113+
(void)protocol; \
114+
(void)family
113115
#endif
114116

115117
static PHP_GINIT_FUNCTION(sockets);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /