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 496548 - Including malloc.h breaks macos build
Including malloc.h breaks macos build
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Mac OS
: Normal blocker
: 0.10.15
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-11-13 20:02 UTC by Richard Hult
Modified: 2007-11-14 11:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove malloc includes (1.97 KB, patch)
2007-11-13 20:02 UTC, Richard Hult
none Details | Review
A patch that makes it use g_malloc/g_free instead, I mean. (3.92 KB, patch)
2007-11-13 23:09 UTC, Jan Schmidt
none Details | Review

Description Richard Hult 2007-11-13 20:02:15 UTC
The fft code Includes malloc.h, which breaks on mac os x. I don't think any sane unix requires you to do that, since malloc is part of stdlib and that header is already included in those files. I can't say for sure that some obscene OS will break if include is removed though. Will attach a patch.
Comment 1 Richard Hult 2007-11-13 20:02:55 UTC
Created attachment 99049 [details] [review]
Remove malloc includes
Comment 2 Sebastian Dröge (slomo) 2007-11-13 20:20:55 UTC
Thanks for reporting. The patch is of course correct, marking this as a blocker so we maybe can get this fixed before the release.
Comment 3 David Schleef 2007-11-13 21:19:03 UTC
Seeing this bug makes me miss gst-lint.
Comment 4 Jan Schmidt 2007-11-13 23:04:07 UTC
Yes, this needs fixing before the release - 'Doesn't build on OSX' is a bad regression.

I don't think our fft module should be using malloc at all - we have g_malloc and g_free to avoid things like this on b00nky os'es

I'm not doing releases tonight then. Someone, please give me a patch
Comment 5 Jan Schmidt 2007-11-13 23:09:33 UTC
Created attachment 99062 [details] [review]
A patch that makes it use g_malloc/g_free instead, I mean. 

Anyone unhappy with this patch?
Comment 6 Sebastian Dröge (slomo) 2007-11-14 04:38:22 UTC
Looks good to me and works fine...
Comment 7 Richard Hult 2007-11-14 07:35:14 UTC
Thanks for the quick responses here :) Patch looks good to me too.
Comment 8 Edward Hervey 2007-11-14 10:31:35 UTC
looks fine to me
Comment 9 Jan Schmidt 2007-11-14 11:13:26 UTC
Fixed in CVS:
2007-11-14  Jan Schmidt  <jan.schmidt@sun.com>

        * gst-libs/gst/fft/kiss_fft_f32.h:
        * gst-libs/gst/fft/kiss_fft_f64.h:
        * gst-libs/gst/fft/kiss_fft_s16.h:
        * gst-libs/gst/fft/kiss_fft_s32.h:
        Don't include malloc.h which doesn't exist on Mac OSX.
        Instead, pull in glib.h and use g_malloc/g_free for
        consistency. Fixes: #496548