Bug 104815 - Build fails when libc provides memfd_create
Summary: Build fails when libc provides memfd_create
Status: RESOLVED DUPLICATE of bug 104733
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: build-system (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-27 21:17 UTC by Khem Raj
Modified: 2018-01-29 00:48 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
proposed fix (2.19 KB, patch)
2018-01-27 21:22 UTC, Khem Raj
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Khem Raj 2018-01-27 21:17:53 UTC
build fails with errors like

In file included from ../../../../../../../../workspace/sources/pulseaudio/src/pulsecore/shm.c:48:0:
../../../../../../../../workspace/sources/pulseaudio/src/pulsecore/memfd-wrappers.h:36:19: error: static declaration of 'memfd_create' follows non-static declaration
 static inline int memfd_create(const char *name, unsigned int flags) {

with glibc upcoming 2.27 release
Comment 1 Khem Raj 2018-01-27 21:22:48 UTC
Created attachment 136998 [details] [review]
proposed fix
Comment 2 Tanu Kaskinen 2018-01-29 00:48:46 UTC
Thanks for reporting! This is a duplicate of bug 104733, though. Bug 104733 has a patch too, which I think is slightly better in some ways than yours, but that patch hasn't been tested with the new glibc version. Could you test it?

One difference between the two patches is that your patch passes "#include <sys/mman.h>" to the AC_CHECK_FUNC call, which seemed like a good idea, but I had a look at the autoconf manual, and AC_CHECK_FUNC doesn't actually take a fourth parameter. AC_CHECK_FUNC primarily checks that the function is found when linking, and I suppose the missing #include doesn't prevent linking from working.

*** This bug has been marked as a duplicate of bug 104733 ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.