Skip to content

Commit 5f5b7d0

Browse files
authored
bpo-45163: Haiku build fix. (pythonGH-28269)
linkage issues mainly for shared libs and missing system library, also little nit into the signal extension as strsignal returns a constant in this platform.
1 parent b74c819 commit 5f5b7d0

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixes Haiku platform build.

Modules/signalmodule.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ static PyObject *
611611
signal_strsignal_impl(PyObject *module, int signalnum)
612612
/*[clinic end generated code: output=44e12e1e3b666261 input=b77914b03f856c74]*/
613613
{
614-
char *res;
614+
const char *res;
615615

616616
if (signalnum < 1 || signalnum >= NSIG) {
617617
PyErr_SetString(PyExc_ValueError,

configure.ac

+5-1
Original file line numberDiff line numberDiff line change
@@ -2736,7 +2736,7 @@ then
27362736
BLDSHARED="$LDSHARED"
27372737
fi
27382738
;;
2739-
Linux*|GNU*|QNX*|VxWorks*)
2739+
Linux*|GNU*|QNX*|VxWorks*|Haiku*)
27402740
LDSHARED='$(CC) -shared'
27412741
LDCXXSHARED='$(CXX) -shared';;
27422742
FreeBSD*)
@@ -2805,6 +2805,7 @@ then
28052805
Linux-android*) ;;
28062806
Linux*|GNU*) CCSHARED="-fPIC";;
28072807
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
2808+
Haiku*) CCSHARED="-fPIC";;
28082809
OpenUNIX*|UnixWare*)
28092810
if test "$GCC" = "yes"
28102811
then CCSHARED="-fPIC"
@@ -3098,6 +3099,9 @@ AC_SUBST(TZPATH)
30983099
AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
30993100
AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
31003101

3102+
# Haiku system library
3103+
AC_CHECK_LIB(network, socket, [LIBS="-lnetwork $LIBS"], [], $LIBS)
3104+
31013105
AC_MSG_CHECKING(for --with-libs)
31023106
AC_ARG_WITH(libs,
31033107
AS_HELP_STRING([--with-libs='lib1 ...'], [link against additional libs (default is no)]),

0 commit comments

Comments
 (0)