Bug 78709 - any2ppm fails to build on architectures without MMU
Summary: any2ppm fails to build on architectures without MMU
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.12.10
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-14 20:36 UTC by Eric Le Bihan
Modified: 2014-06-06 03:49 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Add check for fork() when compiling any2ppm as daemon (1.05 KB, text/plain)
2014-05-14 20:36 UTC, Eric Le Bihan
Details
Updated version of any2ppm fix for no-MMU platforms (895 bytes, patch)
2014-05-18 13:28 UTC, Eric Le Bihan
Details | Splinter Review

Description Eric Le Bihan 2014-05-14 20:36:12 UTC
Created attachment 99045 [details]
Add check for fork() when compiling any2ppm as daemon

When trying to build cairo for the Microblaze platform, the compilation of any2ppm fails because fork() is not available as this architecture does not have a MMU.

The attached patch adds a check for fork() if any2ppm should be compiled to run as daemon.
Comment 1 Eric Le Bihan 2014-05-15 07:37:42 UTC
(In reply to comment #0)
> Created attachment 99045 [details]
> Add check for fork() when compiling any2ppm as daemon
> 
> When trying to build cairo for the Microblaze platform, the compilation of
> any2ppm fails because fork() is not available as this architecture does not
> have a MMU.
Oops, I mean Blackfin, not Microblaze.
Comment 2 Ravi Nanjundappa 2014-05-15 08:32:53 UTC
Comment on attachment 99045 [details]
Add check for fork() when compiling any2ppm as daemon

I feel conditional checking of HAVE_FORK macro, should be seperated out. Because in the above patch, HAVE_FORK has been added in the conditional checking of header file related macros.

How about the below change ? 


diff --git a/test/any2ppm.c b/test/any2ppm.c
index b125496..3e0806f 100644
--- a/test/any2ppm.c
+++ b/test/any2ppm.c
@@ -92,8 +92,10 @@
 #define SOCKET_PATH "./.any2ppm"
 #define TIMEOUT 60000 /* 60 seconds */

+#if HAVE_FORK
 #define CAN_RUN_AS_DAEMON 1
 #endif
+#endif

 #define ARRAY_LENGTH(A) (sizeof (A) / sizeof (A[0]))
Comment 3 Eric Le Bihan 2014-05-18 13:28:25 UTC
Created attachment 99273 [details] [review]
Updated version of any2ppm fix for no-MMU platforms
Comment 4 Ravi Nanjundappa 2014-05-21 04:22:58 UTC
Comment on attachment 99273 [details] [review]
Updated version of any2ppm fix for no-MMU platforms

Review of attachment 99273 [details] [review]:
-----------------------------------------------------------------

Looks good. But please test and share the results of this patch on an environment not supporting fork() or MMU.
Comment 5 Bryce Harrington 2014-06-05 23:10:33 UTC
Thanks, applied.
Comment 6 Ravi Nanjundappa 2014-06-06 03:49:49 UTC
(In reply to comment #5)
> Thanks, applied.

Thank you Bryce :)


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.