Bug 104815

Summary: Build fails when libc provides memfd_create
Product: PulseAudio Reporter: Khem Raj <raj.khem>
Component: build-systemAssignee: pulseaudio-bugs
Status: RESOLVED DUPLICATE QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: lennart, raj.khem
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: proposed fix

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.