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 741933 - tests: use MAP_ANON instead of MAP_ANONYMOUS
tests: use MAP_ANON instead of MAP_ANONYMOUS
Status: RESOLVED FIXED
Product: gdk-pixbuf
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
Depends on:
Blocks:
 
 
Reported: 2014-12-24 00:08 UTC by Allison Karlitskaya (desrt)
Modified: 2014-12-28 04:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests: use MAP_ANON instead of MAP_ANONYMOUS (1.25 KB, patch)
2014-12-24 00:08 UTC, Allison Karlitskaya (desrt)
reviewed Details | Review

Description Allison Karlitskaya (desrt) 2014-12-24 00:08:45 UTC
This was introduced in a test case a few months ago and breaks the build
on Mac OS.

According to manpages on Linux these two are the same (although it lists
MAP_ANON as a deprecated alias for the other).  On Mac OS, however,
there is only MAP_ANON.

Interesting to note that neither of these are in POSIX.
Comment 1 Allison Karlitskaya (desrt) 2014-12-24 00:08:47 UTC
Created attachment 293307 [details] [review]
tests: use MAP_ANON instead of MAP_ANONYMOUS
Comment 2 Emmanuele Bassi (:ebassi) 2014-12-26 15:58:25 UTC
Review of attachment 293307 [details] [review]:

LGTM, but maybe we could do this as well:

#ifndef MAP_ANONYMOUS
#define MAP_ANONYMOUS MAP_ANON
#endif

this way, we get to keep MAP_ANONYMOUS on Linux. to be fair, though, it's fine by me either way.
Comment 3 Allison Karlitskaya (desrt) 2014-12-28 04:37:22 UTC
Pushed the suggested fix with #ifndef #define.

Seems to work on Mac OS and doesn't break Linux either.