Skip to content

bpo-45163: haiku build fix proposal. #28269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 11, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Modules/signalmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,11 @@ static PyObject *
signal_strsignal_impl(PyObject *module, int signalnum)
/*[clinic end generated code: output=44e12e1e3b666261 input=b77914b03f856c74]*/
{
#ifdef __HAIKU__
const char * res;
#else
char *res;
#endif

if (signalnum < 1 || signalnum >= NSIG) {
PyErr_SetString(PyExc_ValueError,
Expand Down Expand Up @@ -663,7 +667,7 @@ signal_strsignal_impl(PyObject *module, int signalnum)
}
#else
errno = 0;
res = strsignal(signalnum);
res = (const char *)strsignal(signalnum);

if (errno || res == NULL || strstr(res, "Unknown signal") != NULL)
Py_RETURN_NONE;
Expand Down
6 changes: 5 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2736,7 +2736,7 @@ then
BLDSHARED="$LDSHARED"
fi
;;
Linux*|GNU*|QNX*|VxWorks*)
Linux*|GNU*|QNX*|VxWorks*|Haiku*)
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared';;
FreeBSD*)
Expand Down Expand Up @@ -2805,6 +2805,7 @@ then
Linux-android*) ;;
Linux*|GNU*) CCSHARED="-fPIC";;
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Haiku*) CCSHARED="-fPIC";;
OpenUNIX*|UnixWare*)
if test "$GCC" = "yes"
then CCSHARED="-fPIC"
Expand Down Expand Up @@ -3098,6 +3099,9 @@ AC_SUBST(TZPATH)
AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets

# Haiku system library
AC_CHECK_LIB(network, socket, [LIBS="-lnetwork $LIBS"], [] $LIBS)

AC_MSG_CHECKING(for --with-libs)
AC_ARG_WITH(libs,
AS_HELP_STRING([--with-libs='lib1 ...'], [link against additional libs (default is no)]),
Expand Down