After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728272 - make broadway backend build on OpenBSD
make broadway backend build on OpenBSD
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Broadway
3.12.x
Other OpenBSD
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-04-15 15:38 UTC by Antoine Jacoutot
Modified: 2014-04-18 16:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
check for librt and posix_fallocate (2.39 KB, patch)
2014-04-15 15:38 UTC, Antoine Jacoutot
needs-work Details | Review
check for librt and posix_fallocate v2 (2.36 KB, patch)
2014-04-17 23:01 UTC, Antoine Jacoutot
needs-work Details | Review
check for librt and posix_fallocate v3 (2.36 KB, patch)
2014-04-18 12:32 UTC, Antoine Jacoutot
accepted-commit_now Details | Review

Description Antoine Jacoutot 2014-04-15 15:38:16 UTC
Hi.

On my (hard) way to get jhbuild running on OpenBSD, here's a patch that allows building the broadway backend on OpenBSD.

On OpenBSD shm_open(3) is part of libc and there is not librt, so add an
according check.
Check if we have posix_fallocate before using it.

I don't know if these are the best way to achieve what I am after, comments welcome.
Thanks :-)
Comment 1 Antoine Jacoutot 2014-04-15 15:38:38 UTC
Created attachment 274376 [details] [review]
check for librt and posix_fallocate
Comment 2 Matthias Clasen 2014-04-15 18:18:12 UTC
Review of attachment 274376 [details] [review]:

::: configure.ac
@@ +403,3 @@
+AC_CHECK_FUNC([posix_fallocate],
+  [AC_DEFINE(HAVE_POSIX_FALLOCATE, 1, [Have the posix_fallocate function])])
+

I would just use AC_CHECK_FUNCS here, which will define the right symbol.
Comment 3 Antoine Jacoutot 2014-04-17 23:00:55 UTC
> I would just use AC_CHECK_FUNCS here, which will define the right symbol.

Oh right, much better :-)
Comment 4 Antoine Jacoutot 2014-04-17 23:01:56 UTC
Created attachment 274633 [details] [review]
check for librt and posix_fallocate v2
Comment 5 Matthias Clasen 2014-04-18 12:12:04 UTC
Review of attachment 274633 [details] [review]:

::: gdk/broadway/Makefile.am
@@ +77,3 @@
 if OS_UNIX
 libgdk_broadway_la_LIBADD = \
+	@SHM_LIBS@          \

Sorry, overlooked this the first time: @SHM_LIBS@ should probably be $(SHM_LIBS) here - thats what the AC_SUBST is for.
Comment 6 Antoine Jacoutot 2014-04-18 12:30:45 UTC
> Sorry, overlooked this the first time: @SHM_LIBS@ should probably be
> $(SHM_LIBS) here - thats what the AC_SUBST is for.

Oopsy, here you go sir :-)
Comment 7 Antoine Jacoutot 2014-04-18 12:32:04 UTC
Created attachment 274666 [details] [review]
check for librt and posix_fallocate v3
Comment 8 Matthias Clasen 2014-04-18 15:39:23 UTC
Review of attachment 274666 [details] [review]:

perfect now.
Comment 9 Antoine Jacoutot 2014-04-18 16:21:38 UTC
pushed as 2e1d0df
Thanks for coping with my autotools stupidity ;-)